JavaScript2

(Difference between revisions)
(add support request and workarounds for @lends)
 
(9 intermediate revisions not shown)
Line 3: Line 3:
This document contains information about rewriting JavaScript editor. The umbrella task for the rewrite is [http://netbeans.org/bugzilla/show_bug.cgi?id=205870 issue #205870].
This document contains information about rewriting JavaScript editor. The umbrella task for the rewrite is [http://netbeans.org/bugzilla/show_bug.cgi?id=205870 issue #205870].
-
The development is done on branch javascript2 in [http://hg.netbeans.org/web-main/summary web-main] repository. There are two new modules javascript2.editor and javascirpt2.kit. There is also [http://bertram2.netbeans.org:8080/job/javascript2/ continual] build from the branch.
+
As of July 10th, the new JavaScript editor is now a part of the main trunk codeline, can be tried out in the [http://bits.netbeans.org/download/trunk/nightly/ daily builds]. The code is in two new modules: javascript2.editor and javascript2.kit.
 +
 
 +
The editor rewrite contains mainly these tasks:
 +
* Parser integration
 +
* Coloring lexer
 +
* Error checking
 +
* Hints
 +
* Creating model
 +
* Folding
 +
* Navigator
 +
* Indentation
 +
* Formatting
 +
* Marking pairs of chars (), {}, '', "", []
 +
* inserting ), }, ', ", ] after in pressing (, }, ', ",]
 +
* code completion
 +
* Support for documentation tools (like jsDoc, DOJO, jQuery)
 +
 
 +
Next big task is JSON support.
 +
 
 +
Document about progress of rewriting JS editor and comparing new and old support can be watched [[ProgressJSEditorRewrite|here]]. See also the following blog entries about the new JavaScript editor: [https://blogs.oracle.com/netbeansphp/entry/new_javascript_editor first], [https://blogs.oracle.com/netbeansphp/entry/javascript_code_folding second] and [https://blogs.oracle.com/netbeansphp/entry/jquery_support third].
 +
 
 +
 
 +
== JsDoc Support ==
 +
 
 +
"For now we are supporting all JsDoc2 [http://code.google.com/p/jsdoc-toolkit/wiki/TagReference tags]" [http://netbeans.org/bugzilla/show_bug.cgi?id=222233#c1]
 +
 
 +
===connected tags===
 +
ie used by the language model for code completion and documentation [http://netbeans.org/bugzilla/show_bug.cgi?id=222233#c5]
 +
 
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagClass @class]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagConstructor @constructor]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagConstructs @constructs]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagDeprecated @deprecated]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagPrivate @private]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagPublic @public]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagStatic @static]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagReturns @returns]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagType @type]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagProperty @property]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagParam @param]
 +
 
 +
===documentation-only tags===
 +
 
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagSince @since]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagAuthor @author]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagDescription @description]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagExample @example]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagFileOverview @fileOverview]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagThrows @throws]
 +
 
 +
===parse-only tags===
 +
netbeans should correctly parse all other tags, but they're not used,
 +
ie neither connected nor used by the documentation. connecting a tag to the language model has an impact on performance, so the developers are evaluating them on a case by case basis. to request support for a tag, enter an issue in the bug tracker
 +
 
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagAugments @augments] - [http://netbeans.org/bugzilla/show_bug.cgi?id=224727 support request]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagBorrows @borrows] _that_ as _this_
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagConstant @constant]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagDefault @default]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagEvent @event]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagField @field]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagFunction @function]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagIgnore @ignore]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagInner @inner]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagLends @lends] - [http://netbeans.org/bugzilla/show_bug.cgi?id=224729 support request]
 +
      workaround #1: the lending object can be assigned to the class prototype directly
 +
      workaround #2: the lending object can be initially named as the class
 +
  * {[https://code.google.com/p/jsdoc-toolkit/wiki/TagLink @link] ...}
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagMemberOf @memberOf]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagName @name]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagNamespace @namespace]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagRequires @requires]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagSee @see]
 +
  * [https://code.google.com/p/jsdoc-toolkit/wiki/TagVersion @version]
 +
 
 +
===synonyms===
 +
  * @argument - Deprecated synonym for @param
 +
  * @extends - Synonym for @augments

Current revision as of 23:47, 10 January 2013

Contents

JavaScript Support Rewrite

This document contains information about rewriting JavaScript editor. The umbrella task for the rewrite is issue #205870.

As of July 10th, the new JavaScript editor is now a part of the main trunk codeline, can be tried out in the daily builds. The code is in two new modules: javascript2.editor and javascript2.kit.

The editor rewrite contains mainly these tasks:

  • Parser integration
  • Coloring lexer
  • Error checking
  • Hints
  • Creating model
  • Folding
  • Navigator
  • Indentation
  • Formatting
  • Marking pairs of chars (), {}, , "", []
  • inserting ), }, ', ", ] after in pressing (, }, ', ",]
  • code completion
  • Support for documentation tools (like jsDoc, DOJO, jQuery)

Next big task is JSON support.

Document about progress of rewriting JS editor and comparing new and old support can be watched here. See also the following blog entries about the new JavaScript editor: first, second and third.


JsDoc Support

"For now we are supporting all JsDoc2 tags" [1]

connected tags

ie used by the language model for code completion and documentation [2]

 * @class
 * @constructor
 * @constructs
 * @deprecated
 * @private
 * @public
 * @static
 * @returns
 * @type
 * @property
 * @param

documentation-only tags

 * @since
 * @author
 * @description
 * @example
 * @fileOverview
 * @throws

parse-only tags

netbeans should correctly parse all other tags, but they're not used, ie neither connected nor used by the documentation. connecting a tag to the language model has an impact on performance, so the developers are evaluating them on a case by case basis. to request support for a tag, enter an issue in the bug tracker

 * @augments - support request
 * @borrows _that_ as _this_
 * @constant
 * @default
 * @event
 * @field
 * @function
 * @ignore
 * @inner
 * @lends - support request
      workaround #1: the lending object can be assigned to the class prototype directly
      workaround #2: the lending object can be initially named as the class
 * {@link ...}
 * @memberOf
 * @name
 * @namespace
 * @requires
 * @see
 * @version

synonyms

 * @argument - Deprecated synonym for @param
 * @extends - Synonym for @augments
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo