开发者

Why are my .js files launching in gedit from eclipse?

开发者 https://www.devze.com 2023-03-10 09:54 出处:网络
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 reco

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

  1. Eclipse IDE for Java Developers
  2. Eclipse Web Developer Tools
  3. Javascript Development Tools
  4. PyDev for Eclipse
  5. 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!

0

精彩评论

暂无评论...
验证码 换一张
取 消