Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 35847 - Problem in Ant Editor - Wrong code assist proposal for <junit><test>
Summary: Problem in Ant Editor - Wrong code assist proposal for <junit><test>
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-30 06:12 EST by Gilles Figoni CLA
Modified: 2009-08-30 02:19 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (2.61 KB, text/plain)
2003-05-21 14:49 EDT, Blake Meike CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gilles Figoni CLA 2003-03-30 06:12:27 EST
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.
Comment 1 Darin Swanson CLA 2003-04-10 13:05:56 EDT
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.
Comment 2 Darin Swanson CLA 2003-04-25 11:47:29 EDT
Please investigate Blake.
Comment 3 Blake Meike CLA 2003-04-25 14:30:56 EDT
"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.



Comment 4 Bob Foster CLA 2003-05-17 02:43:42 EDT
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.
Comment 5 Blake Meike CLA 2003-05-21 14:49:56 EDT
Created attachment 4926 [details]
Proposed fix
Comment 6 Darin Swanson CLA 2003-05-22 05:11:21 EDT
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)
Comment 7 Darin Swanson CLA 2003-05-23 07:41:34 EDT
Where is the Eclipse XSD project?
Comment 8 Blake Meike CLA 2003-05-23 08:00:56 EDT
The Eclipse XSD project page is:
http://www.eclipse.org/xsd/
Comment 9 Darin Swanson CLA 2003-05-23 10:45:11 EDT
I do not think that we can consider a change that will require adding a new 
plugin to the standard eclipse set of plugins
Comment 10 Darin Swanson CLA 2004-03-01 18:27:46 EST
Nothing planned for 3.0
Comment 11 Darin Swanson CLA 2004-08-26 13:00:56 EDT
Closing as a known problem.
Comment 12 Denis Roy CLA 2009-08-30 02:19:12 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.