Set JSEclipse as the default JavaScript editor

After installation, JSEclipse will automatically configure Eclipse's file extension associations so that .js files will be opened with it. If for some reason this fails, or you install another plugin that changes the association and you want to change it back, follow the next steps:

  1. Open Eclipse.

  2. Go to Window > Preferences.

  3. Expand the General category. Also expand the Editors sub-category.

  4. Select the File Associations item. The preferences page that opens has two main areas:

  5. If the .js extension does not appear in the top list, you have to manually add it. To do so, click the Add button. In the dialog box that opens, enter .js and click OK.


     

  6. Now the extension is shown in the list, but does not have the JSEclipse editor associated. This is easily noticed, since the file extension does not have a particular icon, and the Associated editors box is empty:


     

  7. With the *.js extension selected, click on the Add button of the Associated editors box. This will allow defining an editor. In the dialog box that opens, a list of internal editors is displayed by default. Select JSEclipse and click OK:



    Note:
    If the JSEclipse entry does not appear in the list, and you have installed the plugin correctly, you may need to run Eclipse with the -clean argument to correct any potential problems. Exit the workbench, open a command prompt (or a shell console if running Linux), and run eclipse -clean. Then go back to step 4.

  8. Now the *.js file extension is associated with the JSEclipse editor.

 

After the association has been performed, all the JavaScript files will appear in the Package explorer with the JSEclipse icon. The same icon will be displayed in the editor's title bar, next to the file name and the close button.