Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 236656 Details for
Bug 417958
Document orion.core.astprovider
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
jsdoc updates
astprovider.patch (text/plain), 3.52 KB, created by
Michael Rennie
on 2013-10-18 10:40:54 EDT
(
hide
)
Description:
jsdoc updates
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2013-10-18 10:40:54 EDT
Size:
3.52 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/edit/ast.js b/bundles/org.eclipse.orion.client.ui/web/orion/edit/ast.js >index 72b9ef1..fa5e18b 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/edit/ast.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/edit/ast.js >@@ -33,6 +33,13 @@ > this.start(); > } > objects.mixin(ASTManager.prototype, /** @lends orion.edit.ASTManager.prototype */ { >+ /** >+ * @name start >+ * @description starts the manager, throws a nnew error if the manager has laready been started >+ * @function >+ * @public >+ * @memberof ASTManager.prototype >+ */ > start: function() { > if (this.registration) { > throw new Error("Already started"); >@@ -46,20 +53,39 @@ > getAST: this.getAST.bind(this) > }, null); //$NON-NLS-0$ > }, >+ /** >+ * @name stop >+ * @description stops the manager, throws an error is the manager is not running >+ * @function >+ * @public >+ * @memberof ASTManager.prototype >+ */ > stop: function() { >+ if(!this.registration) { >+ throw new Error("Manager not running"); >+ } > this.registration.unregister(); > this.contextRegistration.unregister(); > this.tracker.close(); > this.listener = this.cachedAST = null; > }, > /** >- * Notifies the AST manager of a change to the model. >+ * @name updated >+ * @description Notifies the AST manager of a change to the model. >+ * @function >+ * @public >+ * @memberof ASTManager.prototype > * @param {Object} event > */ > updated: function(event) { > this.cachedAST = null; > }, > /** >+ * @name _getASTProvider >+ * @description Returns the AST provider for the given content type id >+ * @function >+ * @private >+ * @memberof ASTManager.prototype > * @param {String} contentTypeId > * @returns {Object} An AST provider capable of providing an AST for the given contentType. > */ >@@ -71,24 +97,34 @@ > return serviceRef ? this.serviceRegistry.getService(serviceRef) : null; > }, > /** >- * @param {String} contentTypeId >- * @returns {Object|orion.Promise} >+ * @name _getAST >+ * @description Computes the AST for the given content type id and context >+ * @function >+ * @private >+ * @memberof ASTManager.prototype >+ * @param {String} contentTypeId the id of the content type to conpute the AST for >+ * @param {Object} astContext the context in which to compute the AST >+ * @returns {Object|orion.Promise} or <code>null</code> if there are no providers for an AST of the given content type > */ >- _getAST: function(contentTypeId, options) { >+ _getAST: function(contentTypeId, astContext) { > if (this.cachedAST) { > return this.cachedAST; > } > var provider = this._getASTProvider(contentTypeId); > if (provider) { >- options.text = this.inputManager.getEditor().getText(); >- return provider.computeAST(options); >+ astContext.text = this.inputManager.getEditor().getText(); >+ return provider.computeAST(astContext); > } > return null; > }, > /** >- * Retrieves an AST from a capable AST provider. >+ * @name getAST >+ * @description Retrieves an AST from a capable AST provider. >+ * @function >+ * @public >+ * @memberof ASTManager.prototype > * @param {Object} [options={}] Options to be passed to the AST provider. >- * @returns {orion.Promise} A promise that resolves to the AST. Resolves to <code>null</code> if no capable provider was found. >+ * @returns {Object|orion.Promise} A promise that resolves to the AST. Resolves to <code>null</code> if no capable provider was found. > */ > getAST: function(options) { > options = options || {};
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 417958
: 236656