Package org.eclipse.ease.lang.javascript
Class JavaScriptCodeParser
java.lang.Object
org.eclipse.ease.AbstractCodeParser
org.eclipse.ease.lang.javascript.JavaScriptCodeParser
- All Implemented Interfaces:
ICodeParser
-
Field Summary
Fields inherited from class org.eclipse.ease.AbstractCodeParser
PARAMETER_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContext
(IScriptEngine scriptEngine, Object resource, String contents, int position, int selectionRange) Parse the given piece of code into a language specificICompletionContext
.Methods inherited from class org.eclipse.ease.AbstractCodeParser
extractKeywords, getHeaderComment, isAcceptedBeforeHeader
-
Constructor Details
-
JavaScriptCodeParser
public JavaScriptCodeParser()
-
-
Method Details
-
getContext
public ICompletionContext getContext(IScriptEngine scriptEngine, Object resource, String contents, int position, int selectionRange) Description copied from interface:ICodeParser
Parse the given piece of code into a language specificICompletionContext
.- Parameters:
scriptEngine
- running script engineresource
- resource instance to be parsedcontents
- code to be parsed (only up to cursor position)position
- cursor position within contentsselectionRange
- amount of selected characters from cursor position- Returns:
ICompletionContext
with parsed information if successful,null
in case invalid syntax given.
-