Need to refresh tree in ProjectView

Hi,

I have implemented the TreeStructureProvider interface and in its modify method I am modifying the Icon of the tree node.

I am writing a VCS plugin and when I perform certain actions on the file like checkin I want to modify the Icon in the Project view.

Currently, when I perform an action, TreeStructureProvider's modify method does get called but the tree is not refreshed. If I switch between other windows or expand/collapse the tree I can see the changes.

Is there any way by which I can update/refresh the tree in the project view.

Thanks in advance for the help.

~Priya

4 comments

Good luck getting an answer to this - I never got one. FWIW, this seems to work in the latest Demetra builds though when calling ProjectView.refresh(). You can try it in 5.1 as well, maybe it works for you.

Sascha

0

Thanks for the reply. I am using Idea 5.1 version.
I tried ProjectView.getInstance(project).refresh(), but I am getting an NPE for ProjectView.getInstance(project). My project object is not null.

I am calling refresh from actionPerformed method.

Do you know the reason why I must be getting NPE or is the method from where I am calling refresh is not correct?

0

Do you know the reason why I must be getting NPE or
is the method from where I am calling refresh is not
correct?


Not without having seen the exception itself, but a very possible cause of this is the incorrect presence of idea.jar in your plugin's sandbox, just like your other problem here (http://www.intellij.net/forums/message.jspa?messageID=5079808#5079808). Since removing the jar solved the other problem, you should try ProjectView.refresh() again as well.

Sascha

0

Got the problem solved, it was because of wrong placement of idea.jar, it has to be added in IDEA SDK classpath. Thanks a lot for the help

0

Please sign in to leave a comment.