Community
Participate
Working Groups
Eclipse 2.1.0 - buildid: 200303272130 Ant : 1.5.2 In an ant build file (named build.xml), using the Ant Editor, the code assist gives me wrong proposals for the attributes of the inner element <test> of the optional task <junit>. It proposes me the following attributes : classname, append, failonerror, jar, timeout, newenvironnement, output, jvmversion, args, taskname, id, dir, fork, classpath, maxmemory, classpathref, description, forceshowtrace, showbanner, jvmargs, showtrace, showsuccess, jvm. The attributes of this inner elements should be (for ant 1.5.2) : fork, haltonerror, errorproperty, haltonfailure, failureproperty, filtretrace, todir, if, unless.
The code assist is incorrectly presenting the proposals for the Test task instead of for the nested <test> element. Looking at the 1.5.2 and 1.5.3 doc the attributes for the nested <test> element are: name, fork, haltonerror, errorproperty, haltonfailure, failureproperty, filtertrace, todir, outfile, if, unless.
Please investigate Blake.
"Investigate" is right. DTDs do not allow the definition of multiple contextually distinguished elements with the same name. Since somebody else got the "test" element first, I see three choices: 1) beg the owners of the (optional) junit task to change their "test" element to "jtest" or something. 2) use something other than a DTD (e.g., Schema) to describe the document (a large project...) 3) subvert the DTD (which never actually seems to be used to validate the doc...). Perhaps instead of the defining the real element name, concatenate each with the name of its parent (e.g., "junit.test"). Do a similar concatenation in the lookup code and strip the prefix before presenting the completion proposals. Please advise.
Yup, DTDs don't allow two elements with the same name and different contents. There is no way to fix this except use a superior technology, like RELAX NG.
Created attachment 4926 [details] Proposed fix
I am currently on a trip to Europe and have not had email for 2 days :-( I will attempt to look at the contribution later today (FYI)
Where is the Eclipse XSD project?
The Eclipse XSD project page is: http://www.eclipse.org/xsd/
I do not think that we can consider a change that will require adding a new plugin to the standard eclipse set of plugins
Nothing planned for 3.0
Closing as a known problem.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.