I'm using Eclipse 3.4.2 Ganymede...
with the Web and Java EE Environment add-on installed.
I have a Dynamic Web Project with a number of scripts and html pages in it.
In my HTML file, I've added a few scripts.
<script type="text/javascript" src="scripts/dojo/dojo.js"></script>
<script type="text/javascript" src="scripts/getpoints.js"></script>
Since the getpoints.js file does not directly reference dojo.js, Eclipse's error/warning highlightings in getpoints.js are useless.
How can I get Eclipse to detect this relationship correctly and display the correct errors/warnings?
Edit: for reference, these are the predominant errors
dojo cannot be resolved
XMLHttpRequest cannot be resolved or is not a field
ActiveXObject cannot be resolved or is not a field
as well as a few more related to specifics of the project.
Solutions:
- I found out that if I add a number of my js files to my sources and browser globals, I solved some of my errors.
Project -> Properties -> Javascript -> Javascript Libraries -> Source -> Add File from Project` Project -> Properties -> Javascript -> Javascript Libraries -> Global Supertypes -> Select & Reorder Libraries
My ajax related errors came from accidentally declaring
var http.Dojo's error was minimized by the solution given below.