public abstract class AbstractCodeParser extends Object implements ICodeParser
| Modifier and Type | Field and Description |
|---|---|
static String |
LINE_DELIMITER
Default line break character.
|
| Constructor and Description |
|---|
AbstractCodeParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
createHeader(Map<String,String> headerContent)
Create a script header for given keywords.
|
ICompletionContext |
getContext(IScriptEngine scriptEngine,
Object resource,
String contents,
int position,
int selectionRange)
Parse the given piece of code into a language specific
ICompletionContext. |
Map<String,String> |
parse(InputStream stream)
Parse stream for key:value pairs.
|
public static final String LINE_DELIMITER
public Map<String,String> parse(InputStream stream)
ICodeParserparse in interface ICodeParserstream - stream to parsepublic String createHeader(Map<String,String> headerContent)
ICodeParsercreateHeader in interface ICodeParserheaderContent - key:value pairs to be storedpublic ICompletionContext getContext(IScriptEngine scriptEngine, Object resource, String contents, int position, int selectionRange)
ICodeParserICompletionContext.getContext in interface ICodeParserscriptEngine - 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 positionICompletionContext with parsed information if successful, null in case invalid syntax given.