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)
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)
-
I think support for JavaScript es from a plugin in Eclipse. If such a plugin is installed, you have a dedicated JavaScript Editor you can associate the
.js
files with. – Laurent Pireyn Commented Jun 3, 2011 at 14:12 - Do you know which plugins I need? – super9 Commented Jun 3, 2011 at 14:22
- I haven't used Eclipse in months. Try google./search?q=eclipse+plugin+javascript – Laurent Pireyn Commented Jun 3, 2011 at 14:25
1 Answer
Reset to default 8Go 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!