Included xml files with ANT editor highlighting issue

My current setup uses two build.xml files which share common targets. These common targets have been factored out into an xml file and included in my build.xml files by adding

]> to the top of it (before the tag and then I add &commonTargets; further down as a child of . This is recommended technique from the ant FAQ. See: http://ant.apache.org/faq.html#xml-entity-include In IDEA (5.1.1) I have added the common.xml file to the "Ant Build" workspace and added the other build.xml files. The build.xml files appear linked as children to the common.xml file and I can see their targets (indluding the ones they import from common.xml). However, when I open up the common.xml file in the editor the syntax highlighting treats my ]]> tags as red with the note 'element target must be declared'.

Is it possible for IDEA to recognize and treat this included file as an ANT fragment so that highlighting will work properly?

Thanks.

Please sign in to leave a comment.