Internal Ant DTD seems to override local DTD

Hi all

I want to use IDEA for writing some "WebTest" tests (http://webtest.canoo.com). WebTest configuration files are basically ANT xml files that are enhanced with WebTest specific tags. Therefore, the WebTest framework delivers its own DTD to be used with the tests. But even, if I embed this DTD in a test, IDEA only "knows" the ANT tags, but does not know anything about the WebTest Tags ("Cannot resolve symbol").

How to reproduce:

* Create a new project
* Add the two files, that are attached to this post into the source folder
* See that ANT tags like "project" and "target" are discovered correctly
* See that WebTest tags ("invoke", "verifyTitle") are unkown and marked as errors

It seems, that the internal ANT DTD overrides somehow the local DTD that was given. Am I correct, or do I miss something here?

Regards
Christoph



Attachment(s):
WebTest.dtd.zip
Test.xml
7 comments
Comment actions Permalink

Hello.

I thought Ant does not use DTD at all (in particular, IDEA does not use DTD). To define new task, the implementation class should be "registered" in the Ant script using taskdef/typedef tasks.
See Ant manual at http://ant.apache.org/manual/develop.html , examples show it.
IDEA can resolve the task once it is defined via taskdef.

I'm not familiar with WebTest and how it manages to work without taskdef. Probably, it has some custom Ant launcher, that loads necessary classes implicitly. Anyway, DTD does not contain the code which executes the task, so, classes should be provided *somehow*.

Regards,
Alexander.

0
Comment actions Permalink

you should correctly define taskdef for custom tasks in ant to be handled by idea. you should provide the classpath to the custom task usually. make sure you have all the required jara on the classpath and reference them correctly. Also, in recent vesrions of ant you could register custom task via namespaces. make sure your ant version supports this feature if task is providied via custom namespaces.

0
Comment actions Permalink

I investigated your attachements. definetely idea won't be able to handle  the files as you expected unless you provide taskdef as described here - http://webtest.canoo.com/selftest/manual/troubleshooting.html

<taskdef file="${webtest.home}/webtestTaskdefs.properties">
     <classpath>
         <fileset dir="${webtest.home}">
             <include name="lib/*.jar"/>
             <include name="lib/base/*.jar"/>
         </fileset>
         <pathelement path="${webtest.home}/lib"/>
     </classpath>
</taskdef>

0
Comment actions Permalink

And it's a not xml related issue, it's an ant related issue. so the subject is quite misleading.

0
Comment actions Permalink

Hello Alexander & Alexander

thank you for your help. After providing the taskdef information, it seams to work. Unfortunatelly it is unusable slow. I think, this is because of the 185 new Tags and a number more of attributes combined with 26MBs of new JARs that come with WebTest and needs to be analyzed by Idea. Code Completion is not really usable :(

Thanks again & Regards
Christoph

0
Comment actions Permalink

Hello.

To help us avoid performance problem you can provide CPU snapshot as described here: http://devnet.jetbrains.net/docs/DOC-192

Regards,
Alexander.

0
Comment actions Permalink

try to use it not like an ant file, but like simple xml file. Do not add it to the ant panel. Then dtd hint should work fast enough.

0

Please sign in to leave a comment.