Is it OK to use NestingTreeStructureProvider?

Answered

I am looking for a way to nest all generated artifact files in Project View under the source file with our proprietary extension, in a similar way file watchers do.

I found this file: 

com.intellij.ide.projectView.impl.NestingTreeStructureProvider

Which seems to be what I am looking for. However, it's not in my classpath, and also searching for it does not bring any uses outside of JetBrains. Is this the recommended approach? I just want to avoid unnecessary duplication for what must be a fairly common operation.

Thank you

4 comments
Comment actions Permalink

Yes. You could implement the NestingTreeStructureProvider.NestingRulesProvider interface and register your implementation in plugin.xml as the projectViewNestingRulesProvider extension.

0
Comment actions Permalink

Thank you for your answer Sergey.

So.. why is not this file in my classpath and what jar is it in? Doing the following finds nothing.

/Applications/idea/community-unzipped2$ find . -name "*.jar" -exec jar tf {} \; | grep NestingTreeStructureProvider

 

0
Comment actions Permalink

It should be in idea.jar, but this is a new class and maybe it does not exist in your build. Also, I do not recommend to used it now, because we will move necessary interfaces into public API soon.

0
Comment actions Permalink

Next IDEA release will contain the ProjectViewNestingRulesProvider interfaces in public API.

0

Please sign in to leave a comment.