Class GoToMemberAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class GoToMemberAction extends TextAction
Displays a popup dialog with the "Go to member" tree. Language support implementations that can do in-depth parsing of the source code in an editor can create an AbstractSourceTree representing that source, and add this action to RSyntaxTextArea's input/action maps, so users can easily navigate to functions, methods, etc.

The preferred keystroke to bind this action to is Ctrl+Shift+O (Cmd+Shift+O on Mac). Language supports should also be sure to uninstall this shortcut when they are uninstalled themselves.

Version:
1.0
See Also:
  • Field Details

    • outlineTreeClass

      private Class<?> outlineTreeClass
      The outline tree class appropriate for the current language.
  • Constructor Details

    • GoToMemberAction

      public GoToMemberAction(Class<?> outlineTreeClass)
      Constructor.
      Parameters:
      outlineTreeClass - A class extending AbstractSourceTree. This class must have a no-argument constructor.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
    • createTree

      private AbstractSourceTree createTree()
      Creates the outline tree.
      Returns:
      An instance of the outline tree.
    • setLocationBasedOn

      private void setLocationBasedOn(GoToMemberWindow gtmw, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
      Centers the window in the text area.
      Parameters:
      gtmw - The window to center.
      textArea - The parent text area to center it in.