且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Eclipse 的 JavaScript 编辑器插件

更新时间:2023-10-02 16:08:46

在 Eclipse 中完成以下步骤以获取 JavaScript 文件的插件:

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

  1. 打开 Eclipse -> 转到帮助"->安装新软件"
  2. 为您的 Eclipse 版本选择存储库.我有 Juno,所以我选择了 http://download.eclipse.org/releases/juno
  3. 展开编程语言" -> 选中JavaScript 开发工具"旁边的框
  4. 点击下一步"->下一步"->接受许可协议条款->完成"
  5. 等待软件安装,然后重新启动 Eclipse(在弹出窗口中单击是"按钮)
  6. Eclipse重启后,打开Window"->Preferences"->展开General"和Editors"->点击File Associations"->将.js"添加到File types:"列表中,如果它不存在
  7. 在同一个文件关联"对话框中,点击关联编辑器:"部分中的添加"
  8. 选择顶部的内部编辑"单选
  9. 选择JavaScript 查看器".点击确定"->确定"

添加 JavaScript 透视图:(可选)
10. 转到窗口"->打开透视图"->其他..."
11. 选择JavaScript".点击确定"

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

使用突出显示的 JavaScript 语法打开 .html 或 .js 文件:
12.(可选)选择 JavaScript 透视图
13.在Script Explorer中浏览并选择.html或.js文件[JavaScript Perspective](或Package Explorer [Java Perspective]或PyDev Package Explorer [PyDev Perspective]无所谓.)
14. 右键单击​​ .html 或 .js 文件 -> 打开方式" -> 其他..."
15. 选择内部编辑器"
16. 选择Java 脚本编辑器".单击确定"(请参阅​​ JavaScript 语法现已突出显示)

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 )