Package org.fife.rsta.ac.sh
Class ShellLanguageSupport
- java.lang.Object
-
- org.fife.rsta.ac.AbstractLanguageSupport
-
- org.fife.rsta.ac.sh.ShellLanguageSupport
-
- All Implemented Interfaces:
LanguageSupport
public class ShellLanguageSupport extends AbstractLanguageSupport
Language support for Unix shell scripts.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private ShellCompletionProviderproviderThe completion provider.private booleanuseLocalManPagesWhether local man pages should be used.-
Fields inherited from interface org.fife.rsta.ac.LanguageSupport
PROPERTY_LANGUAGE_PARSER
-
-
Constructor Summary
Constructors Constructor Description ShellLanguageSupport()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.ListCellRenderer<java.lang.Object>createDefaultCompletionCellRenderer()Creates the default cell renderer to use when none is specified.private ShellCompletionProvidergetProvider()Lazily creates the shared completion provider instance for sh scripts.booleangetUseLocalManPages()Returns whether the local system's man pages should be used for descriptions of functions.voidinstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Installs this support.voidsetUseLocalManPages(boolean use)Sets whether the local system's man pages should be used for descriptions of functions.voiduninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Uninstalls this support.-
Methods inherited from class org.fife.rsta.ac.AbstractLanguageSupport
createAutoCompletion, getAutoActivationDelay, getAutoCompletionFor, getDefaultCompletionCellRenderer, getShowDescWindow, getTextAreas, installImpl, isAutoActivationEnabled, isAutoCompleteEnabled, isParameterAssistanceEnabled, setAutoActivationDelay, setAutoActivationEnabled, setAutoCompleteEnabled, setDefaultCompletionCellRenderer, setParameterAssistanceEnabled, setShowDescWindow, uninstallImpl
-
-
-
-
Field Detail
-
provider
private ShellCompletionProvider provider
The completion provider. This is shared amongst all sh text areas.
-
useLocalManPages
private boolean useLocalManPages
Whether local man pages should be used.
-
-
Method Detail
-
createDefaultCompletionCellRenderer
protected javax.swing.ListCellRenderer<java.lang.Object> createDefaultCompletionCellRenderer()
Creates the default cell renderer to use when none is specified. Subclasses can override this method if there is a "better" default renderer for a specific language.- Overrides:
createDefaultCompletionCellRendererin classAbstractLanguageSupport- Returns:
- The default renderer for the completion list.
-
getProvider
private ShellCompletionProvider getProvider()
Lazily creates the shared completion provider instance for sh scripts.- Returns:
- The completion provider.
-
getUseLocalManPages
public boolean getUseLocalManPages()
Returns whether the local system's man pages should be used for descriptions of functions. If this returns false, or man cannot be found (e.g. if this is Windows), a shorter description will be used instead.- Returns:
- Whether to use the local man pages in function descriptions.
- See Also:
setUseLocalManPages(boolean)
-
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)
-
setUseLocalManPages
public void setUseLocalManPages(boolean use)
Sets whether the local system's man pages should be used for descriptions of functions. If this is set to false, or man cannot be found (e.g. if this is Windows), a shorter description will be used instead.- Parameters:
use- Whether to use the local man pages in function descriptions.- See Also:
getUseLocalManPages()
-
uninstall
public void uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Uninstalls this support.- Parameters:
textArea- The text area to uninstall from.- See Also:
LanguageSupport.install(RSyntaxTextArea)
-
-