/jEdit/branches/4.3.x-merge-request-2980833/org/gjt/sp/jedit/ActionContext.java

# · Java · 71 lines · 15 code · 6 blank · 50 comment · 0 complexity · 97fac368d6b36818d87c8022d43e9919 MD5 · raw file

  1. /*
  2. * ActionContext.java - For code sharing between jEdit and VFSBrowser
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 1998, 2003 Slava Pestov
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. package org.gjt.sp.jedit;
  23. import java.util.*;
  24. /**
  25. * Manages a collection of action sets. There are two instances of this class
  26. * in jEdit:
  27. * <ul>
  28. * <li>{@link org.gjt.sp.jedit.jEdit#getActionContext()} - editor actions
  29. * <li>{@link org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()} - browser
  30. * actions
  31. * </ul>
  32. *
  33. * @since jEdit 4.2pre1
  34. * @author Slava Pestov
  35. * @version $Id: ActionContext.java 13436 2008-08-27 02:32:08Z ezust $
  36. */
  37. public abstract class ActionContext extends JEditActionContext<EditAction, ActionSet>
  38. {
  39. //{{{ getActionSetForAction() method
  40. /**
  41. * Returns the action set that contains the specified action.
  42. * This method is still here for binary compatility
  43. *
  44. * @param action The action
  45. * @return the actionSet that contains the given action
  46. * @since jEdit 4.2pre1
  47. */
  48. @Override
  49. public ActionSet getActionSetForAction(String action)
  50. {
  51. return super.getActionSetForAction(action);
  52. } //}}}
  53. //{{{ getAction() method
  54. /**
  55. * Returns the specified action.
  56. * @param name The action name
  57. * @return a EditAction or null if it doesn't exist
  58. * @since jEdit 4.2pre1
  59. */
  60. @Override
  61. public EditAction getAction(String name)
  62. {
  63. return super.getAction(name);
  64. } //}}}
  65. }