public class JavaScriptLanguageSupport extends AbstractLanguageSupport
JavaScriptOutlineTreePROPERTY_LANGUAGE_PARSER| Constructor and Description |
|---|
JavaScriptLanguageSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected JarManager |
createJarManager()
Creates a jar manager instance for used in JS language support.
|
protected JavaScriptCompletionProvider |
createJavaScriptCompletionProvider()
Creates the provider to use for an RSTA instance editing JavaScript.
|
java.io.File |
getDefaultJsHintRCFile()
Returns the location of the
.jshintrc file to use if using
JsHint as your error parser, and no .jshintrc file is found in the
current file's folder hierarchy. |
JsErrorParser |
getErrorParser()
Returns the engine to use for checking for syntax errors in JavaScript
files.
|
JarManager |
getJarManager() |
JavaScriptParser |
getJavaScriptParser() |
int |
getJsHintIndent() |
int |
getLanguageVersion()
Sets the JS version to use when parsing the code.
|
JavaScriptParser |
getParser(RSyntaxTextArea textArea)
Returns the JS parser running on a text area with this JavaScript
language support installed.
|
void |
install(RSyntaxTextArea textArea)
Installs this support.
|
boolean |
isClient()
Returns whether this JavaScript support supports client/browser objects.
|
boolean |
isStrictMode()
Returns whether strict mode (more warnings are detected) is enabled.
|
boolean |
isXmlAvailable()
Returns whether E4X is supported in parsed JavaScript.
|
protected void |
reparseDocument(int offset) |
void |
setClient(boolean client)
Set whether the JavaScript support supports client/browser objects.
|
boolean |
setDefaultJsHintRCFile(java.io.File file)
Sets the location of the
.jshintrc file to use if using
JsHint as your error parser, and no .jshintrc file is found in the
current file's folder hierarchy. |
void |
setECMAVersion(java.lang.String version,
JarManager jarManager) |
boolean |
setErrorParser(JsErrorParser errorParser)
Sets the engine to use for identifying syntax errors in JavaScript
files.
|
void |
setLanguageVersion(int languageVersion)
Sets the JS version to use when parsing the code.
|
boolean |
setStrictMode(boolean strict)
Sets whether strict mode (more warnings are detected) is enabled.
|
boolean |
setXmlAvailable(boolean available)
Sets whether E4X is supported in parsed JavaScript.
|
void |
uninstall(RSyntaxTextArea textArea)
Uninstalls this support.
|
createAutoCompletion, createDefaultCompletionCellRenderer, getAutoActivationDelay, getAutoCompletionFor, getDefaultCompletionCellRenderer, getShowDescWindow, getTextAreas, installImpl, isAutoActivationEnabled, isAutoCompleteEnabled, isParameterAssistanceEnabled, setAutoActivationDelay, setAutoActivationEnabled, setAutoCompleteEnabled, setDefaultCompletionCellRenderer, setParameterAssistanceEnabled, setShowDescWindow, uninstallImplprotected JarManager createJarManager()
public void setECMAVersion(java.lang.String version,
JarManager jarManager)
protected JavaScriptCompletionProvider createJavaScriptCompletionProvider()
JavaScriptCompletionProvider.public java.io.File getDefaultJsHintRCFile()
.jshintrc file to use if using
JsHint as your error parser, and no .jshintrc file is found in the
current file's folder hierarchy. This property is ignored if
getErrorParser() does not return JsErrorParser.JSHINT..jshintrc file, or null if none;
in that case, the JsHint defaults will be used.#setJsHintRCFile(File),
setErrorParser(JsErrorParser)public JsErrorParser getErrorParser()
setErrorParser(JsErrorParser)public JarManager getJarManager()
public JavaScriptParser getJavaScriptParser()
public int getJsHintIndent()
public int getLanguageVersion()
JsErrorParser.RHINO.VERSION_xxx constants in Rhino's Context
class. If this is set to a value unknown to Rhino, then Rhino's
default value is used (VERSION_DEFAULT).setLanguageVersion(int)public JavaScriptParser getParser(RSyntaxTextArea textArea)
textArea - The text area.null if the text area
does not have this JavaScriptLanguageSupport
installed.public void install(RSyntaxTextArea textArea)
LanguageSupporttextArea - The text area to install onto.LanguageSupport.uninstall(RSyntaxTextArea)public boolean isStrictMode()
JsErrorParser.RHINO.setStrictMode(boolean)public boolean isXmlAvailable()
JsErrorParser.RHINO.setXmlAvailable(boolean)public boolean isClient()
JsErrorParser.RHINO.setClient(boolean)protected void reparseDocument(int offset)
public void setClient(boolean client)
JsErrorParser.RHINO.client - True if client mode is supported.public boolean setDefaultJsHintRCFile(java.io.File file)
.jshintrc file to use if using
JsHint as your error parser, and no .jshintrc file is found in the
current file's folder hierarchy. This property is ignored if
getErrorParser() does not return JsErrorParser.JSHINT.file - The .jshintrc file, or null if
none; in that case, the JsHint defaults will be used.getDefaultJsHintRCFile(),
setErrorParser(JsErrorParser)public boolean setErrorParser(JsErrorParser errorParser)
errorParser - The engine to use. This cannot be null.getErrorParser()public void setLanguageVersion(int languageVersion)
JsErrorParser.RHINO.languageVersion - The JS version. This should be one of the
VERSION_xxx constants in Rhino's Context
class. If this is set to a value unknown to Rhino, then Rhino's
default value is used (VERSION_DEFAULT).getLanguageVersion()public boolean setStrictMode(boolean strict)
JsErrorParser.RHINO.strict - Whether strict mode is enabled.isStrictMode()public boolean setXmlAvailable(boolean available)
JsErrorParser.RHINO.available - Whether E4X is supported.isXmlAvailable()public void uninstall(RSyntaxTextArea textArea)
LanguageSupporttextArea - The text area to uninstall from.LanguageSupport.install(RSyntaxTextArea)