Class JavaLanguageSupport
java.lang.Object
org.fife.rsta.ac.AbstractLanguageSupport
org.fife.rsta.ac.java.JavaLanguageSupport
- All Implemented Interfaces:
LanguageSupport
Language support for Java.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInformation about an import statement to add and where it should be added.private static classManages information about the parsing/auto-completion for a single text area.private classA hack of AutoCompletion that forces the JavaParser to re-parse the document when the user presses ctrl+space.private classListens for various events in a text area editing Java (in particular, caret events, so we can track the "active" code block). -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JarManagerThe shared jar manager to use with allJavaCompletionProviders, ornullif each one should have a unique jar manager.private Map<JavaParser, JavaLanguageSupport.Info> Maps JavaParsers to Info instances about them.private static final StringClient property installed on text areas that points to a listener.Fields inherited from interface LanguageSupport
PROPERTY_LANGUAGE_PARSER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCompletionProvider(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Returns the completion provider running on a text area with this Java language support installed.Returns the shared jar manager instance.getParser(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Returns the Java parser running on a text area with this Java language support installed.voidinstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Installs this support.private voidinstallKeyboardShortcuts(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Installs extra keyboard shortcuts supported by this language support.voiduninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Uninstalls this support.private voiduninstallKeyboardShortcuts(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Uninstalls any keyboard shortcuts specific to this language support.Methods inherited from class AbstractLanguageSupport
createAutoCompletion, createDefaultCompletionCellRenderer, getAutoActivationDelay, getAutoCompletionFor, getDefaultCompletionCellRenderer, getShowDescWindow, getTextAreas, installImpl, isAutoActivationEnabled, isAutoCompleteEnabled, isParameterAssistanceEnabled, setAutoActivationDelay, setAutoActivationEnabled, setAutoCompleteEnabled, setDefaultCompletionCellRenderer, setParameterAssistanceEnabled, setShowDescWindow, uninstallImpl
-
Field Details
-
parserToInfoMap
Maps JavaParsers to Info instances about them. -
jarManager
The shared jar manager to use with allJavaCompletionProviders, ornullif each one should have a unique jar manager. -
PROPERTY_LISTENER
Client property installed on text areas that points to a listener.- See Also:
-
-
Constructor Details
-
JavaLanguageSupport
public JavaLanguageSupport()Constructor.
-
-
Method Details
-
getCompletionProvider
public JavaCompletionProvider getCompletionProvider(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Returns the completion provider running on a text area with this Java language support installed.- Parameters:
textArea- The text area.- Returns:
- The completion provider. This will be
nullif the text area does not have this JavaLanguageSupport installed.
-
getJarManager
Returns the shared jar manager instance. NOTE: This method will be removed over time, as the Java support becomes more robust!- Returns:
- The shared jar manager.
-
getParser
Returns the Java parser running on a text area with this Java language support installed.- Parameters:
textArea- The text area.- Returns:
- The Java parser. This will be
nullif the text area does not have this JavaLanguageSupport installed.
-
install
public void install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Installs this support.- Parameters:
textArea- The text area to install onto.- See Also:
-
installKeyboardShortcuts
private void installKeyboardShortcuts(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Installs extra keyboard shortcuts supported by this language support.- Parameters:
textArea- The text area to install the shortcuts into.
-
uninstall
public void uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Description copied from interface:LanguageSupportUninstalls this support.- Parameters:
textArea- The text area to uninstall from.- See Also:
-
uninstallKeyboardShortcuts
private void uninstallKeyboardShortcuts(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) Uninstalls any keyboard shortcuts specific to this language support.- Parameters:
textArea- The text area to uninstall the actions from.
-