Project view customization

Hello.

How can I make my own Project Tree with files and directories, filtered by custom filter in Tool Window with functionality from com.intellij.ide.projectView.impl.ProjectViewPane?

I create a class extended from com.intellij.ide.projectView.impl.ProjectViewPane and override

com.intellij.ide.projectView.impl.ProjectViewPane#createStructure.

All works fine if I register my class as <projectViewPane> in plugin.xml, but if I create dedicated Tool Window by ToolWindowFactory implementation:

@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
Content content = ContentFactory.SERVICE.getInstance().createContent(new MyProjectViewPane(project).createComponent(), "", false);
toolWindow.getContentManager().addContent(content);
}

then files from tree can not be opened and Popup menu does not contain most of actions:

With debug tool, I found that com.intellij.ide.projectView.impl.ProjectViewImp contains most of logic of registration AbstractProjectViewPane, but I didn’t find a way to use it without registration as <projectViewPane> in plugin.xml.

How to implement it?

1 comment
Comment actions Permalink

Hey,
I know it's an old post. But did you found out anything?

0

Please sign in to leave a comment.