开发者

How should I set up RAD/Eclipse to work with JavaScript files and libraries?

开发者 https://www.devze.com 2023-01-16 07:49 出处:网络
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 ou开发者_C百科t how to set RAD up so

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 ou开发者_C百科t 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?


The answer appears to be - use RAD 8. Against the same project, JavaScript code completion and error check seems to work much, much better.

0

精彩评论

暂无评论...
验证码 换一张
取 消