Using JavaScript Content Assist

These procedures describe how to enable and configure JavaScript
Content Assist options.

Note:

In order for JavaScript elements from libraries and files outside of the project to be made available for use in the Content Assist list, you must enable JavaScript Support for the project and Set the JavaScript Build Path. To access Dojo toolkit content assist options, you must set up Dojo integration in the project while configuring the Build Path.

To access JavaScript Content Assist options:

  1. Type the relevant HTML and JavaScript tags:
    javascript_code.png
  2. JavaScript Content Assist options will now be available.
  3. Type the first few letters of the required element. The Content Assist list will be displayed (if the Content Assist list is not automatically displayed, press Ctrl + Space or go to your JavaScript Content Assist preferences page to configure your auto activation preferences).
  4. Select the relevant option from the Content Assist window by double-clicking or pressing Enter.
  5. If you selected a JavaScript class, type a period "." after the name of the class to display a Content Assist window with the classes' relevant functions and methods.
    javascript_class.png
  6. Select the required option to complete your JavaScript code.

JavaScript Content Assist Configuration

JavaScript Content Assist options can be configured from the JavaScript Content Assist preferences page.

To configure JavaScript Content Assist options:

  1. Go to the JavaScript Content Assist preferences page, accessed from Window | Preferences | Web | JavaScript | Editor | Content Assist.
    javascript_content_assist_preferences.png
  2. Configure the following options, according to your preferences:

Insertion

Sorting and Filtering

Auto-activation

Note:

If this is unmarked, you can display the Content Assist list by pressing Ctrl+Space.

Click Apply to apply your settings.