VJET JS Code Assistance

Based on metadata provided by VJET JS Type Libraries, the code assistance features help developers to code efficiently and accurately. These features are similar to those available in the Eclipse Java plugin; you can refer to Eclipse Help for more information.

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.

Code Assist Help

Functions

Function code assist displays arguments and return types.

Code Assist Function

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

Code Assist Function Completion

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.

Code Assist OL

Property requirements are enforced. In the example, duration is required, so VJET displays an error marker.

Code Assist Required Prop

Once the required property is added, the error marker disappears.

Code Assist Required Prop Met

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.

Callback

Code assist also recognizes when the function definition should not return a value, and displays an error marker when a return is added.

Callback Return Error

Hover over the error marker to display the error message.

Callback Return Error Msg

Code Validation Errors

VJET JS 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.

Code Validation

Validation Hover Help

Details of validation errors appear in the Problems View.

Validation Message in Problems View

Semantic Checking

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

Semantic Error

Semantic Error Hover Help

Syntax Checking

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

Syntax Error

Syntax Error Hover Help

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.

Hover Help

Related reference