This question already has an answer here:
这个问题已经有了答案:
- JavaScript editor within Eclipse [closed] 8 answers
- Eclipse中的JavaScript编辑器[关闭]8个答案
Is there an Eclipse plugin available for JavaScript that allows for syntax checking and autosuggestions for .js files in Eclipse?
是否有一个用于JavaScript的Eclipse插件允许在Eclipse中对.js文件进行语法检查和自动建议?
4 个解决方案
#1
249
Complete the following steps in Eclipse to get plugins for JavaScript files:
在Eclipse中完成以下步骤,以获取JavaScript文件的插件:
- Open Eclipse -> Go to "Help" -> "Install New Software"
- 打开Eclipse ->去“帮助”->“安装新软件”
- Select the repository for your version of Eclipse. I have Juno so I selected
http://download.eclipse.org/releases/juno
- 选择Eclipse版本的存储库。我有Juno,所以我选择了http://download.eclipse.org/releases/juno
- Expand "Programming Languages" -> Check the box next to "JavaScript Development Tools"
- 展开“编程语言”——>复选框旁边的“JavaScript开发工具”
- Click "Next" -> "Next" -> Accept the Terms of the License Agreement -> "Finish"
- 点击“下一步”->“下一步”->接受许可协议条款->“完成”
- Wait for the software to install, then restart Eclipse (by clicking "Yes" button at pop up window)
- 等待软件安装,然后重启Eclipse(点击弹出窗口中的“Yes”按钮)
- 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
- 一旦Eclipse重新启动,打开“窗口”—>“首选项”—>扩展“通用”和“编辑器”—>单击“文件关联”—>添加。如果还没有文件类型列表,则将其发送到“文件类型:”列表
- In the same "File Associations" dialog, click "Add" in the "Associated editors:" section
- 在相同的“文件关联”对话框中,单击“关联编辑器:”部分中的“添加”。
- Select "Internal editors" radio at the top
- 在顶部选择“内部编辑器”收音机
- Select "JavaScript Viewer". Click "OK" -> "OK"
- 选择“JavaScript浏览器”。单击“OK”- >“OK”
To add JavaScript Perspective: (Optional)
10. Go to "Window" -> "Open Perspective" -> "Other..."
11. Select "JavaScript". Click "OK"
添加JavaScript透视图:(可选)10。转到“窗口”->“开放视角”->“其他…”11。选择“JavaScript”。单击“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 )
使用突出显示的JavaScript语法打开.html或.js文件:12。(可选)选择JavaScript透视图13。在[JavaScript透视图]的脚本浏览器中浏览并选择.html或.js文件(或包浏览器[Java透视图]或PyDev包浏览器[PyDev包浏览器])14。右键单击.html或.js文件-> "Open With" -> "Other…"15。选择“内部编辑器”16。选择“Java脚本编辑器”。单击“OK”(现在突出显示了JavaScript语法)
#2
5
Think that JavaScriptDevelopmentTools might do it. Although, I have eclipse indigo, and I'm pretty sure it does that kind of thing automatically.
认为javascript开发工具可以做到这一点。虽然,我有eclipse indigo,而且我很确定它会自动完成这类事情。
#3
4
JavaScript that allows for syntax checking
允许语法检查的JavaScript
JSHint-Eclipse
JSHint-Eclipse
and autosuggestions for .js files in Eclipse?
Eclipse中.js文件的自动建议?
- Use JSDoc more as JSDT has nice support for the standard, so you will get more suggestions for your own code.
- 更多地使用JSDoc,因为JSDT对标准有很好的支持,所以您将获得更多关于您自己代码的建议。
- There is new TernIDE that provide additional hints for .js and AngulatJS .html. Get them together as Anide from
http://www.nodeclipse.org/updates/anide/
- 新的TernIDE为.js和AngulatJS .html提供了额外的提示。从http://www.nodeclipse.org/updates/anide/将它们合并为Anide
As Nodeclipse lead, I am always looking for what is available in Eclipse ecosystem. Nodeclipse site has even more links, and I am inviting to collaborate on the JavaScript tools on GitHub
作为Nodeclipse的领导,我一直在寻找Eclipse生态系统中可用的内容。Nodeclipse站点有更多的链接,我邀请您在GitHub上合作开发JavaScript工具
#4
2
In 2015 I would go with:
2015年我将与:
- For small scripts: The js editor + jsHint plugin
- 对于小脚本:js编辑器+ jsHint插件
- For large code bases: TypeScript Eclipse plugin, or a similar transpiled language... I only know that TypeScript works well in Eclipse.
- 对于大型代码库:打字稿Eclipse插件,或者类似的跨语言……我只知道打字稿在Eclipse中工作得很好。
Of course you may want to keep JS for easy project setup and to avoid the transpilation process... there is no ultimate solution.
当然,您可能希望保持JS以便于项目设置,并避免传输过程……没有最终的解决方案。
Or just wait for ECMA6, 7, ... :)
或者只是等待ECMA6, 7,……:)
#1
249
Complete the following steps in Eclipse to get plugins for JavaScript files:
在Eclipse中完成以下步骤,以获取JavaScript文件的插件:
- Open Eclipse -> Go to "Help" -> "Install New Software"
- 打开Eclipse ->去“帮助”->“安装新软件”
- Select the repository for your version of Eclipse. I have Juno so I selected
http://download.eclipse.org/releases/juno
- 选择Eclipse版本的存储库。我有Juno,所以我选择了http://download.eclipse.org/releases/juno
- Expand "Programming Languages" -> Check the box next to "JavaScript Development Tools"
- 展开“编程语言”——>复选框旁边的“JavaScript开发工具”
- Click "Next" -> "Next" -> Accept the Terms of the License Agreement -> "Finish"
- 点击“下一步”->“下一步”->接受许可协议条款->“完成”
- Wait for the software to install, then restart Eclipse (by clicking "Yes" button at pop up window)
- 等待软件安装,然后重启Eclipse(点击弹出窗口中的“Yes”按钮)
- 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
- 一旦Eclipse重新启动,打开“窗口”—>“首选项”—>扩展“通用”和“编辑器”—>单击“文件关联”—>添加。如果还没有文件类型列表,则将其发送到“文件类型:”列表
- In the same "File Associations" dialog, click "Add" in the "Associated editors:" section
- 在相同的“文件关联”对话框中,单击“关联编辑器:”部分中的“添加”。
- Select "Internal editors" radio at the top
- 在顶部选择“内部编辑器”收音机
- Select "JavaScript Viewer". Click "OK" -> "OK"
- 选择“JavaScript浏览器”。单击“OK”- >“OK”
To add JavaScript Perspective: (Optional)
10. Go to "Window" -> "Open Perspective" -> "Other..."
11. Select "JavaScript". Click "OK"
添加JavaScript透视图:(可选)10。转到“窗口”->“开放视角”->“其他…”11。选择“JavaScript”。单击“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 )
使用突出显示的JavaScript语法打开.html或.js文件:12。(可选)选择JavaScript透视图13。在[JavaScript透视图]的脚本浏览器中浏览并选择.html或.js文件(或包浏览器[Java透视图]或PyDev包浏览器[PyDev包浏览器])14。右键单击.html或.js文件-> "Open With" -> "Other…"15。选择“内部编辑器”16。选择“Java脚本编辑器”。单击“OK”(现在突出显示了JavaScript语法)
#2
5
Think that JavaScriptDevelopmentTools might do it. Although, I have eclipse indigo, and I'm pretty sure it does that kind of thing automatically.
认为javascript开发工具可以做到这一点。虽然,我有eclipse indigo,而且我很确定它会自动完成这类事情。
#3
4
JavaScript that allows for syntax checking
允许语法检查的JavaScript
JSHint-Eclipse
JSHint-Eclipse
and autosuggestions for .js files in Eclipse?
Eclipse中.js文件的自动建议?
- Use JSDoc more as JSDT has nice support for the standard, so you will get more suggestions for your own code.
- 更多地使用JSDoc,因为JSDT对标准有很好的支持,所以您将获得更多关于您自己代码的建议。
- There is new TernIDE that provide additional hints for .js and AngulatJS .html. Get them together as Anide from
http://www.nodeclipse.org/updates/anide/
- 新的TernIDE为.js和AngulatJS .html提供了额外的提示。从http://www.nodeclipse.org/updates/anide/将它们合并为Anide
As Nodeclipse lead, I am always looking for what is available in Eclipse ecosystem. Nodeclipse site has even more links, and I am inviting to collaborate on the JavaScript tools on GitHub
作为Nodeclipse的领导,我一直在寻找Eclipse生态系统中可用的内容。Nodeclipse站点有更多的链接,我邀请您在GitHub上合作开发JavaScript工具
#4
2
In 2015 I would go with:
2015年我将与:
- For small scripts: The js editor + jsHint plugin
- 对于小脚本:js编辑器+ jsHint插件
- For large code bases: TypeScript Eclipse plugin, or a similar transpiled language... I only know that TypeScript works well in Eclipse.
- 对于大型代码库:打字稿Eclipse插件,或者类似的跨语言……我只知道打字稿在Eclipse中工作得很好。
Of course you may want to keep JS for easy project setup and to avoid the transpilation process... there is no ultimate solution.
当然,您可能希望保持JS以便于项目设置,并避免传输过程……没有最终的解决方案。
Or just wait for ECMA6, 7, ... :)
或者只是等待ECMA6, 7,……:)