I have a larger maven mu开发者_StackOverflowlti-module project where multiple languages are involved. Now with Eclipse JDT and JSDT installed the code coloring works fine but code completion in JavaScript does not work very well which makes it hard to be productive. Eclipse does not seem to find JavaScript classes in my project so i am also not able to jump around JavaScript methods very easily. Mapping JavaScript classes seems also not possible since this is a Java project and i see no way to mix up project natures.
Is there a way to improve this behavior? Or are there any other JavaScript Plugins which are able to do so and work simultaneously with JDT?
You can definitely mix Java and JavaScript development in Eclipse. The Dynamic Web Project creates such a configuration by default.
To add JavaScript support to any Java project, do the following...
- Project Properties -> Project Facets
- Click on "Convert to faceted form" link
- Check JavaScript and hit ok to close the dialog.
- Make sure that you are in a perspective that has "Project Explorer" view as opposed to "Package Explorer", which is standard in Java perspective or open that view yourself. Unlike the Java-specific Package Explorer, the Project Explorer view accommodates different technology extensions, such as JavaScript.
Enjoy. Facets are somewhat like natures, but unlike natures the can be user-manipulated without hacking metadata files. New Eclipse tooling, like JSDT has been moving to providing facets to make enablement easier.
Does it work for you if you open up your .project file and add a new <nature>
into the <natures>
element? I've done that to apply the java nature to non-java projects which had other natures.
精彩评论