Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

VJET/Code Assistance Features

< VJET
Revision as of 12:51, 18 January 2013 by Earlyster.gmail.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The VJET JS IDE brings common IDE code assistance features to JavaScript.  This overview provides examples of using:

Code Assist

Press Ctrl-Space for code assist, which displays an 'as you type' list of code proposals. Use the arrow keys to scroll the list, and press the Enter key to insert the selected code.

Code assist displays Help as you scroll through the options.

Vjet help hover3.gif

Functions

Function code assist displays arguments and return types.

Vjet code assist function.gif



Upon selection, the function is inserted with arguments and a hover over help tip.

Vjet code assist function3.gif



Object Literals

Object Literal code assist displays a list of the object literal's properties. Note the question mark ('?') in the proposal. This indicates that the property is optional. In the example, duration is required, the other properties are optional.

Vjet olcodeassist.gif

Property requirements are enforced. In the example, node and properties  are required, so VJET displays an error marker.

Vjet code assist required.gif

Vjet olcodeassist 2.gif

Once the required property (properties) is added, the error marker disappears.
Vjet olcodeassist 3.gif
 

Callbacks

The example includes a callback within the object literal. Code assist recognizes that node is a Node type, and proposes the appropriate code options.

Vjet code assist callback.gif


Code assist also verifies the function's return; that is, whether or not a return value is expected, and if so, is the return type correct. In the example, the return type is not correct.

Vjet code assist callback return err2.gif


Hover over the error marker to display the error message.

Vjet code assist callback return errMsg2.gif

Code Validation

VJET JS  IDE detects validation errors and marks incorrect code.  Hover over the error marker for the error message, or go to the Problems View for detailed information.

Vjet validation.gif

Vjet validation hover.gif


Details of validation errors appear in the Problems View.

Vjet validation problemsView.gif


Semantic Checking

VJET JS detects semantic errors and marks the incorrect code. Hover over the error marker for the error message.

Vjet code assist semantic.gif

Vjet code assist semantic msg2.gif

Syntax Checking

VJET JS detects syntax errors and marks the incorrect code. Hover over the error marker for the error message.

Vjet syntax.gif

Vjet syntax2.gif


Hover Help

Placing the cursor over an entity is another way to display Help. Some help content is large and will be truncated; press the F2 key to display the full help content.
Vjet help hover4.gif

Back to the top