Class JavaScriptCodeParser

All Implemented Interfaces:
ICodeParser

public class JavaScriptCodeParser
extends AbstractCompletionParser
  • 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 specific ICompletionContext.
      Specified by:
      getContext in interface ICodeParser
      Overrides:
      getContext in class AbstractCodeParser
      Parameters:
      scriptEngine - running script engine
      resource - resource instance to be parsed
      contents - code to be parsed (only up to cursor position)
      position - cursor position within contents
      selectionRange - amount of selected characters from cursor position
      Returns:
      ICompletionContext with parsed information if successful, null in case invalid syntax given.