How to easily write Javascript__java under eclipse

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.