Class Index | File Index

Classes


Class javascript.JsonAstManager

Provides a shared AST for JSON files.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.javascript/web/javascript/jsonAstManager.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Provides a shared AST.
Method Summary
Method Attributes Method Name and Description
 
getAST(editorContext, fileName)
Returns the AST representing the text from the backing editor context
 
getJSON(editorContext, fileName)
 
getWellFormedAST(editorContext, fileName)
Returns an ESTree spec-compliant AST
 
Callback from the FileClient
 
Callback from the orion.edit.model service
 
Callback from the orion.edit.model service
Class Detail
javascript.JsonAstManager()
Provides a shared AST.
Since:
15.0
Method Detail
{orion.Promise} getAST(editorContext, fileName)
Returns the AST representing the text from the backing editor context
Parameters:
{orion.editor.EditorContext} editorContext
{String} fileName
The name of the file we want the AST for. This name is checked against the file metadata, and if the names to not match, return null
Deprecated:
This function is provided only to be able to use the malformed AST that the parser provides out of the box. Callers should use the getWellFormedAST function that produces an ESTree-spec compliant AST
Returns:
{orion.Promise} A promise resolving to the AST.

getJSON(editorContext, fileName)
Parameters:
editorContext
fileName

{Deferred} getWellFormedAST(editorContext, fileName)
Returns an ESTree spec-compliant AST
Parameters:
{EditorContext} editorContext
The backing editor context
{String} fileName
The name of the file to get the AST for
Returns:
{Deferred} A promise to return an AST

onFileChanged(event)
Callback from the FileClient
Parameters:
{Object} event
a Changed event

onInputChanged(event)
Callback from the orion.edit.model service
Parameters:
{Object} event
An orion.edit.model event.
See:
https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.model

onModelChanging(event)
Callback from the orion.edit.model service
Parameters:
{Object} event
An orion.edit.model event.
See:
https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.model

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 29 2017 14:37:19 GMT-0400 (EDT)