我应该如何设置 RAD/Eclipse 来处理 JavaScript 文件和库?
我正在 RAD 7.5 中的 Maven 项目 Web 应用程序中处理一些 javascript 文件。
我的文件使用库,并相互引用。我无法弄清楚如何设置 RAD 以便进行错误检查和代码完成。现在,无论我使用外部库,我的所有脚本都会显示错误。
我已按如下方式设置文件夹和脚本:
- src/main/webapp/js/lib 中的库(只读)
- src/main/webapp 中的脚本(读/写) /js/scripts
然后我设置了我的 javascript 属性(右键单击项目 -> 属性 -> JavaScript -> JavaScript 库),以便 js/lib 被定义为库中的库选项卡中,js/scripts 被定义为“源”选项卡中的源文件夹。
显然这不起作用,否则我不会问。无论我使用库引入的功能,我的 js/scripts 中的文件仍然显示错误。将脚本文件夹定义为库可以解决所有错误,但我无法编辑文件。
我做错了什么?
I'm working on some javascript files in a Maven project web application in RAD 7.5.
My files use libraries, and refer to each other. I'm having trouble working out how to set RAD up so that I get error-checking and code completion. Right now, all my scripts show errors wherever I use an external library.
I've set up my folders and scripts as follows:
- libraries (read-only) in
src/main/webapp/js/lib
- scripts (read/write) in
src/main/webapp/js/scripts
I've then set up my javascript properties (Right-click on project -> Properties -> JavaScript -> JavaScript Libraries) so that js/lib is defined as a library in the Libraries tab, and js/scripts is defined as a source folder in the Source tab.
It's obviously not working, or I wouldn't be asking. My files in js/scripts are still showing errors wherever I use functionality introduced by my libraries. Defining the script folder as a library resolves all the errors, but I then can't edit the files.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案似乎是 - 使用 RAD 8。针对同一个项目,JavaScript 代码完成和错误检查似乎工作得更好得多。
The answer appears to be - use RAD 8. Against the same project, JavaScript code completion and error check seems to work much, much better.