Code example to navigate and highlight color programmaticly. Like Version control.

As you see in the list  this ideomapplicationplugin is colored. I am trying to build a plugin where I can color background of this at least with any color I want.

I just need a code block where I can navigate all these project files and mark its background..


Please help :(

Comment actions Permalink
This way I can get the project... Is there a way to get files and mark background color of it.

for (Project project : projects) {
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
ToolWindow toolWindow =toolWindowManager.getToolWindow("Project");
JComponent toolWindowComponent = toolWindow.getComponent();
Splitter splitter = (Splitter)
Container tab = (Container)splitter.getFirstComponent().getComponent(0);
Container tabWrapper = (Container) tab.getComponent(0);
JScrollPane treeScroller = (JScrollPane)tabWrapper.getComponent(0);
JTree tree = (JTree) treeScroller.getViewport().getView();
Comment actions Permalink

I found something about


implements TreeStructureProvider

How can I use it ? Is there any detailed explaination.

Comment actions Permalink

You can specify a custom set of files here:
Preferences | Appearance & Behavior | Scopes

Then you can choose a corresponding color for each scope:
Preferences | Appearance & Behavior | File Colors


Please sign in to leave a comment.