public class PerlLanguageSupport extends AbstractLanguageSupport
PROPERTY_LANGUAGE_PARSER| Constructor and Description |
|---|
PerlLanguageSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.ListCellRenderer |
createDefaultCompletionCellRenderer()
Creates the default cell renderer to use when none is specified.
|
static java.io.File |
getDefaultPerlInstallLocation()
Returns the location of the first Perl install located on the user's
PATH.
|
PerlParser |
getParser(RSyntaxTextArea textArea)
Returns the Perl parser running on a text area with this Perl language
support installed.
|
java.lang.String |
getPerl5LibOverride()
Returns the value to use for
PERL5LIB when parsing Perl
code. |
static java.io.File |
getPerlInstallLocation()
Returns the Perl install that is being used for syntax checking.
|
boolean |
getUseParensWithFunctions()
Returns whether parens are inserted when auto-completing functions.
|
static boolean |
getUseSystemPerldoc()
Returns whether to use the system "perldoc" command when getting
descriptions of Perl functions.
|
boolean |
getWarningsEnabled()
Returns whether warnings are enabled when checking syntax.
|
void |
install(RSyntaxTextArea textArea)
Installs this support.
|
boolean |
isParsingEnabled()
Returns whether text areas with this language support installed are
parsed for syntax errors.
|
boolean |
isTaintModeEnabled()
Returns whether taint mode is enabled when checking syntax.
|
void |
setParsingEnabled(boolean enabled)
Toggles whether text areas with this language support installed are
parsed for syntax errors.
|
void |
setPerl5LibOverride(java.lang.String override)
Sets the value to use for
PERL5LIB when parsing Perl
code. |
static void |
setPerlInstallLocation(java.io.File loc)
Sets the Perl install to use for syntax checking, perldoc, etc.
|
void |
setTaintModeEnabled(boolean enabled)
Toggles whether taint mode is enabled when checking syntax.
|
void |
setUseParensWithFunctions(boolean use)
Toggles whether parens are inserted when auto-completing functions.
|
static void |
setUseSystemPerldoc(boolean use)
Sets whether to use the system "perldoc" command when getting
descriptions of Perl functions.
|
void |
setWarningsEnabled(boolean enabled)
Toggles whether warnings are returned when checking syntax.
|
void |
uninstall(RSyntaxTextArea textArea)
Uninstalls this support.
|
createAutoCompletion, getAutoActivationDelay, getAutoCompletionFor, getDefaultCompletionCellRenderer, getShowDescWindow, getTextAreas, installImpl, isAutoActivationEnabled, isAutoCompleteEnabled, isParameterAssistanceEnabled, setAutoActivationDelay, setAutoActivationEnabled, setAutoCompleteEnabled, setDefaultCompletionCellRenderer, setParameterAssistanceEnabled, setShowDescWindow, uninstallImplprotected javax.swing.ListCellRenderer createDefaultCompletionCellRenderer()
createDefaultCompletionCellRenderer in class AbstractLanguageSupportpublic static java.io.File getDefaultPerlInstallLocation()
getPerlInstallLocation()public static java.io.File getPerlInstallLocation()
null
if none is currently selected.setPerlInstallLocation(File)public PerlParser getParser(RSyntaxTextArea textArea)
textArea - The text area.null if the text
area does not have this PerlLanguageSupport installed.public java.lang.String getPerl5LibOverride()
PERL5LIB when parsing Perl
code.null to use the system default.setPerl5LibOverride(String)public boolean getUseParensWithFunctions()
setUseParensWithFunctions(boolean)public static boolean getUseSystemPerldoc()
false, then
a built-in snapshot of Perl 5.10 descriptions will be used. This will
perform better, but may be out of date if your version of Perl is newer.
Note that this parameter is ignored if getPerlInstallLocation()
returns null.
setUseSystemPerldoc(boolean)public boolean getWarningsEnabled()
setWarningsEnabled(boolean)public void install(RSyntaxTextArea textArea)
textArea - The text area to install onto.LanguageSupport.uninstall(RSyntaxTextArea)public boolean isParsingEnabled()
Note that if getPerlInstallLocation()
returns null or an invalid value, parsing will not occur
even if this value is true.
setParsingEnabled(boolean)public boolean isTaintModeEnabled()
setTaintModeEnabled(boolean)public void setParsingEnabled(boolean enabled)
enabled - Whether parsing should be enabled.isParsingEnabled()public void setPerl5LibOverride(java.lang.String override)
PERL5LIB when parsing Perl
code.override - The value, or null to use the system
default.getPerl5LibOverride()public static void setPerlInstallLocation(java.io.File loc)
loc - The root directory of the Perl installation, or
null for none.getPerlInstallLocation()public void setTaintModeEnabled(boolean enabled)
enabled - Whether taint mode should be enabled.isTaintModeEnabled()public void setWarningsEnabled(boolean enabled)
enabled - Whether warnings are enabled.getWarningsEnabled()public void setUseParensWithFunctions(boolean use)
use - Whether parens are inserted.getUseParensWithFunctions()public static void setUseSystemPerldoc(boolean use)
false, then
a built-in snapshot of Perl 5.10 descriptions will be used. This will
perform better, but may be out of date if your version of Perl is newer.
Note that this parameter is ignored if getPerlInstallLocation()
returns null.
use - Whether to use the system "perldoc" command.getUseSystemPerldoc()public void uninstall(RSyntaxTextArea textArea)
textArea - The text area to uninstall from.LanguageSupport.install(RSyntaxTextArea)