LocalInspectionTool for XML files?

Is it possible to write a LocalInspectionTool that can inspect XML files?

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

5 comments
Comment actions Permalink

Nope. It possible only for methods, fields and classes if I'm remember correctly. :(

TIA,
Dmitry

0
Comment actions Permalink

Dmitry Kashin wrote:

Nope. It possible only for methods, fields and classes if I'm remember correctly. :(


Feature request filed in tracker:
http://www.intellij.net/tracker/idea/viewSCR?publicId=34283

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0
Comment actions Permalink

Is it possible in Idea 6.0?

0
Comment actions Permalink

Yes. The best way is probably to override the buildVisitor() method in LocalInspectionTool. In the custom PsiElementVisitor you return, you can override the relevant visitXmlXXX() methods.

Bas

0
Comment actions Permalink

Use com.intellij.codeInspection.XmlSuppressableInspectionTool to inherit "suppress" functionality

 

0

Please sign in to leave a comment.