Package org.fife.rsta.ac
Class GoToMemberAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
org.fife.rsta.ac.GoToMemberAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
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 Summary
FieldsModifier and TypeFieldDescriptionprivate Class<?> The outline tree class appropriate for the current language.Fields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate AbstractSourceTreeCreates the outline tree.private voidsetLocationBasedOn(GoToMemberWindow gtmw, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Centers the window in the text area.Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponentMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
outlineTreeClass
The outline tree class appropriate for the current language.
-
-
Constructor Details
-
GoToMemberAction
Constructor.- Parameters:
outlineTreeClass- A class extendingAbstractSourceTree. This class must have a no-argument constructor.
-
-
Method Details
-
actionPerformed
-
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.
-