Howe to autodetect Facet by checking file content

Hello
I'm developing facet autodetection for my plugin. The condition of facet is presence of filter with certain class name in web.xml.
I was able to make autodetection by checking presence of web.xml in project files and detecting root tag.
But what is the best practice to check content of web.xml when adding facet detector to facet detector registry ?

2 comments
Comment actions Permalink

You can use NanoXmlUtil.parse method to parse content of VirtualFile in your implementation of VirtualFileFilter.

Hello
I'm developing facet autodetection for my plugin. The condition of facet is presence of filter with certain class name in web.xml.
I was able to make autodetection by checking presence of web.xml in project files and detecting root tag.
But what is the best practice to check content of web.xml when adding facet detector to facet detector registry ?



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thnx for giving the idea of where to move next :))

0

Please sign in to leave a comment.