When using Eclipse to edit JS files, because the built-in editing tools do not support the introduction of JS library files, there is no intelligent prompts or automatic completion of the function, so very inconvenient to edit JS file, especially when the project has introduced ext or dojo and other large JS library. So how do you configure the functionality that allows eclipse to support hints and finishes? can refer to the following configuration solution.
1. Download the eclipse Edit JS file plug-in Jseclipse
Can download from http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/
2. Link or directly copy the directory of the plugin to the Eclipse/plugins directory
Specific how to install the Eclipse plug-in can refer to the relevant online introduction, note that you need to restart eclipse before it will take effect.
3. Configure eclipse so that the JS file is opened by default Jseclipse
Refer to the following figure, open the windows/preferences, expand the left General/editors node, select File associations, and find the *.js item on the right panel (if this item is not present, click on the top right-hand corner), Then select Jseclipse, and then click the Default button in the lower right corner, set the JS file default open mode for Jseclipse
4. Open any JS file, will appear jseclipse menu, and then click Add Library
5. In the pop-up window directly input you need to import the JS library files, such as Ext-all.js file
Note that this is generally a direct input, because if you click browser select files, because the default only XML files, then choose not to JS file, so direct input
6. Click OK, then select the Refresh Code completion Library under the Jseclipse menu, refreshing the configuration
7. Check to see if the Workspace/.metadata/.plugins/com.interaktonline.jseclipse directory was created, and if so, the configuration was successful
8. Reopen any JS file, input related objects can be intelligent prompts related methods or variables, the following figure