Package org.fife.rsta.ac.java
Class JavaLanguageSupport
- java.lang.Object
-
- org.fife.rsta.ac.AbstractLanguageSupport
-
- org.fife.rsta.ac.java.JavaLanguageSupport
-
- All Implemented Interfaces:
LanguageSupport
public class JavaLanguageSupport extends AbstractLanguageSupport
Language support for Java.- Version:
- 1.0
- See Also:
JavaOutlineTree
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classJavaLanguageSupport.ImportToAddInfoInformation about an import statement to add and where it should be added.private static classJavaLanguageSupport.InfoManages information about the parsing/auto-completion for a single text area.private classJavaLanguageSupport.JavaAutoCompletionA hack of AutoCompletion that forces the JavaParser to re-parse the document when the user presses ctrl+space.private classJavaLanguageSupport.ListenerListens for various events in a text area editing Java (in particular, caret events, so we can track the "active" code block).
-
Field Summary
Fields Modifier and Type Field Description private JarManagerjarManagerThe shared jar manager to use with allJavaCompletionProviders, ornullif each one should have a unique jar manager.private java.util.Map<JavaParser,JavaLanguageSupport.Info>parserToInfoMapMaps JavaParsers to Info instances about them.private static java.lang.StringPROPERTY_LISTENERClient property installed on text areas that points to a listener.-
Fields inherited from interface org.fife.rsta.ac.LanguageSupport
PROPERTY_LANGUAGE_PARSER
-
-
Constructor Summary
Constructors Constructor Description JavaLanguageSupport()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaCompletionProvidergetCompletionProvider(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Returns the completion provider running on a text area with this Java language support installed.JarManagergetJarManager()Returns the shared jar manager instance.JavaParsergetParser(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 org.fife.rsta.ac.AbstractLanguageSupport
createAutoCompletion, createDefaultCompletionCellRenderer, getAutoActivationDelay, getAutoCompletionFor, getDefaultCompletionCellRenderer, getShowDescWindow, getTextAreas, installImpl, isAutoActivationEnabled, isAutoCompleteEnabled, isParameterAssistanceEnabled, setAutoActivationDelay, setAutoActivationEnabled, setAutoCompleteEnabled, setDefaultCompletionCellRenderer, setParameterAssistanceEnabled, setShowDescWindow, uninstallImpl
-
-
-
-
Field Detail
-
parserToInfoMap
private java.util.Map<JavaParser,JavaLanguageSupport.Info> parserToInfoMap
Maps JavaParsers to Info instances about them.
-
jarManager
private JarManager jarManager
The shared jar manager to use with allJavaCompletionProviders, ornullif each one should have a unique jar manager.
-
PROPERTY_LISTENER
private static final java.lang.String PROPERTY_LISTENER
Client property installed on text areas that points to a listener.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public JarManager 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
public JavaParser getParser(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
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:
LanguageSupport.uninstall(RSyntaxTextArea)
-
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:
LanguageSupport.install(RSyntaxTextArea)
-
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.
-
-