Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
VJET/Code Assistance Features
The VJET JS IDE brings common IDE code assistance features to JavaScript. This overview provides examples of using:
Contents
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.
Functions
Function code assist displays arguments and return types.
Upon selection, the function is inserted with arguments and a hover over help tip.
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.
Property requirements are enforced. In the example, node and properties are required, so VJET displays an error marker.
Once the required property (properties) is added, the error marker disappears.
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.
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.
Hover over the error marker to display the error message.
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.
Details of validation errors appear in the Problems View.
Semantic Checking
VJET JS detects semantic errors and marks the incorrect code. Hover over the error marker for the error message.
Syntax Checking
VJET JS detects syntax errors and marks the incorrect code. Hover over the error marker for the error message.
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.