org.eclipse.wst.jsdt.web.core.javascript
Class JsTranslator

java.lang.Object
  extended by Job
      extended by org.eclipse.wst.jsdt.web.core.javascript.JsTranslator
All Implemented Interfaces:
IJsTranslator

public class JsTranslator
extends Job
implements IJsTranslator

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. Translates a JSP/HTML document into its JavaScript pieces.


Constructor Summary
JsTranslator()
           
JsTranslator(IStructuredDocument document, java.lang.String fileName)
           
JsTranslator(IStructuredDocument document, java.lang.String fileName, boolean listenForChanges)
           
 
Method Summary
 void documentAboutToBeChanged(DocumentEvent event)
           
 void documentChanged(DocumentEvent event)
           
 Position[] getHtmlLocations()
           
 Position[] getImportHtmlRanges()
           
 java.lang.String getJsText()
           
 int getMissingEndTagRegionStart()
           
 java.lang.String[] getRawImports()
           
 void release()
          release any resources the translation is holding onto.
 void setBuffer(IBuffer buffer)
          sets the javascript unit buffer
 void translate()
          begin translating the document.
 void translateInlineJSNode(IStructuredDocumentRegion container)
          translates an inline (event="..") js container region and adds it to the document text.
 void translateJSNode(IStructuredDocumentRegion container)
          translates a script block.
 void translateScriptImportNode(IStructuredDocumentRegion region)
          translates a tag

getImportHtmlRanges

public Position[] getImportHtmlRanges()
Specified by:
getImportHtmlRanges in interface IJsTranslator
Returns:
position array of