Eclipse的JavaScript编辑器插件 [英] JavaScript Editor Plugin for Eclipse

查看:237
本文介绍了Eclipse的JavaScript编辑器插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

是否有可用于JavaScript的Eclipse插件可用于Eclipse中的.js文件的语法检查和自动建议?在Eclipse中完成以下步骤以获取JavaScript文件的插件:


  1. 打开Eclipse - >转到帮助 - >安装新软件

  2. 选择您的Eclipse版本的存储库。我有Juno,所以我选择了 http://download.eclipse.org/releases/juno

  3. 展开编程语言 - >选中JavaScript开发工具旁边的框

  4. 点击下一步 - >下一步 - >接受许可协议的条款 - >完成

  5. 等待软件安装,然后重新启动Eclipse(在弹出窗口中点击是按钮)

  6. 一旦Eclipse重新启动,打开Window - >首选项 - >展开常规和编辑器 - >单击文件关联 - >将.js添加到文件类型:列表中,如果尚未存在

  7. <在同一个文件关联对话框中,单击关联编辑器部分中的添加部分
  8. 选择顶部的内部编辑器收音机

  9. 选择JavaScript Viewer。点击确定 - >确定

添加JavaScript透视图:(可选)

10.转到窗口 - >打开透视图 - >其他...

11.选择JavaScript。单击确定



要以突出显示的JavaScript语法打开.html或.js文件:

12.(可选)选择JavaScript透视图

13.在[JavaScript透视图](或包资源管理器[Java透视图])或PyDev包资源管理器[PyDev透视图]中,在Script Explorer中浏览并选择.html或.js文件无关紧要。)

14.右键单击.html或.js文件 - >打开方式 - >其他...

15.选择内部编辑器< br>
16.选择Java脚本编辑器。单击确定(请参阅​​JavaScript语法现在突出显示)


Is there an Eclipse plugin available for JavaScript that allows for syntax checking and autosuggestions for .js files in Eclipse?

解决方案

Complete the following steps in Eclipse to get plugins for JavaScript files:

  1. Open Eclipse -> Go to "Help" -> "Install New Software"
  2. Select the repository for your version of Eclipse. I have Juno so I selected http://download.eclipse.org/releases/juno
  3. Expand "Programming Languages" -> Check the box next to "JavaScript Development Tools"
  4. Click "Next" -> "Next" -> Accept the Terms of the License Agreement -> "Finish"
  5. Wait for the software to install, then restart Eclipse (by clicking "Yes" button at pop up window)
  6. Once Eclipse has restarted, open "Window" -> "Preferences" -> Expand "General" and "Editors" -> Click "File Associations" -> Add ".js" to the "File types:" list, if it is not already there
  7. In the same "File Associations" dialog, click "Add" in the "Associated editors:" section
  8. Select "Internal editors" radio at the top
  9. Select "JavaScript Viewer". Click "OK" -> "OK"

To add JavaScript Perspective: (Optional)
10. Go to "Window" -> "Open Perspective" -> "Other..."
11. Select "JavaScript". Click "OK"

To open .html or .js file with highlighted JavaScript syntax:
12. (Optional) Select JavaScript Perspective
13. Browse and Select .html or .js file in Script Explorer in [JavaScript Perspective] (Or Package Explorer [Java Perspective] Or PyDev Package Explorer [PyDev Perspective] Don't matter.)
14. Right-click on .html or .js file -> "Open With" -> "Other..."
15. Select "Internal editors"
16. Select "Java Script Editor". Click "OK" (see JavaScript syntax is now highlighted )

这篇关于Eclipse的JavaScript编辑器插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆