From the explorer view in Eclipse, whenever I try to open a .js file, it launches in gedit instead? When I try 'right click > open with > text editor' it opens in eclipse but without any colour recognition for the syntax.
All other files work fine (html, 开发者_运维百科py, css). This is driving me crazy!!
UPDATE These are the packages I have installed at the moment
- Eclipse IDE for Java Developers
- Eclipse Web Developer Tools
- Javascript Development Tools
- PyDev for Eclipse
- Web Page Editor (Optional)
Go to the general preferences of eclipse and search for "file associations". There, ensure that "JavaScript Editor" is set for *.js. After that eclipse should open the js files with this editor and bring code highlighting and stuff like that. Be aware, that those files you opened with 'right click > open with > text editor' might have their own setting and will still open up in Text Editor. Choose there "default" again to remove this local setting for the file.
The JavaScript Editor is included in the plugins you mentioned!
精彩评论