I'm using Eclipse Ganymede. Everything works fine, but I have an anal-retentive yearning for a warning-free Problems tab. Right now it (correctly) complains about my ant scripts: "No grammar constraints (DTD or XML schema) detected for the document." Any way to turn that off for just those files? Ideally I'd like it to still warn me if my other schema-constrained files were missing the schema declarations.
+15
A:
The simplest is to supply a minimal DTD to shut it up.
<!DOCTYPE project> for ant files
David Pierre
2009-01-27 12:41:23
Indeed, so the start of your build.xml looks like: `<?xml version = '1.0' encoding = 'windows-1252'?> <!DOCTYPE project> <project name="myproject" default="make" basedir=".">` I had to close + reopen the tab for the warning to go away...
2009-10-01 09:35:34
Sorry if this is a stupid question, but ANT dont have a DTD file that we can point to real validate the XML? Cheers!
Castanho
2010-05-14 02:32:17
None that I know of.Besides Ant extensibility makes it impossible to get a complete one.
David Pierre
2010-05-19 15:01:37
You mean I should include "for ant files" too?
drozzy
2010-06-02 11:09:08
+1
A:
U can delete it and restore it to avoid the warning. It is a bug obviously.
damoco
2010-01-13 05:10:22
A:
In fact, as damoco says, this seems to be a bug in Eclipse. If I delete (copy elsewhere) the file from windows, refresh eclipse, and then restore the file, and refresh again, the warning goes away.
I'm using Eclipse Galileo build 20090621-0832.
MatthieuF
2010-03-02 10:51:52
+1
A:
Even though this thread is a little older, somebody might find this interesting:
http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/jsfunit/index.html
Go to Project Properties -> Validation and follow the screen shots on that page. Should be easy even if you don't speak German. ;-)
This solution worked perfectly for me. Cheers!
Martin
2010-10-01 10:03:34