简体   繁体   English

如何将Javascript文件添加到Eclipse?

[英]How to add Javascript file into Eclipse?

I am using Eclipse Oxygen. 我正在使用Eclipse Oxygen。

I have web features already installed, I think some packages are missing for javascript files. 我已经安装了网络功能,我认为javascript文件缺少某些软件包。

When I try to create a new javascript file, I see that there is no javascript file. 当我尝试创建新的javascript文件时,我看到没有javascript文件。 How to add this feature into eclipse? 如何在eclipse中添加此功能?

screenshot: 屏幕截图:

屏幕截图

You must be using a perspective, which is not suitable for web development. 您必须使用不适合Web开发的透视图。 Try opening a perspective which suits your development domain. 尝试打开适合您开发领域的观点。 Web and Java EE perspectives for example supports JavaScript development. 例如, WebJava EE透视图支持JavaScript开发。 If such is not available in you Eclipse installation, you have to install additional tools. 如果在Eclipse安装中不可用,则必须安装其他工具。 Which Eclipse package are you using? 您正在使用哪个Eclipse软件包

In the right perspective you will have the JavaScript Source File option in the New pop-up dialog right clicking your project or an appropriate project folder (eg. WebContent). 在正确的角度,您将在“ 新建”弹出对话框中右键单击您的项目或适当的项目文件夹(例如WebContent),获得“ JavaScript源文件”选项。

You just look in the wrong "folder" ("Web") to create a new JavaScript-file, the proper path is "JavaScript > JavaScript Source File". 您只是在错误的“文件夹”(“ Web”)中查找以创建新的JavaScript文件,正确的路径是“ JavaScript> JavaScript源文件”。

You can also take advantage of the search in the Wizards when you type the desired search term at type filter text . type filter text键入所需的搜索词时,还可以利用向导中的搜索功能。

Eclipse中的新JavaScript源文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM