Refresh icons in ProjectView

Hi,

I use IconProvider to change the icons of files in the project view but I need to "refresh" them manually and I don't know how to do that.

I already tried to refresh ProjectView, to update AbstractProjectViewPane and to update AbstractTreeBuilder but nothing worked.

It seems that getIcon() of IconProvider is called when typing in the editor, is that right?

 

1
3 comments
Avatar
Permanently deleted user

Could you please show ways you used to update project view?

Have you tried AbstractProjectViewPane#updateFromRoot?

0
Avatar
Permanently deleted user
I tried to update it like this:

ProjectView view = ProjectView.getInstance(project);
view.refresh();

and

AbstractProjectViewPane pane = view.getCurrentProjectViewPane();
pane.updateFromRoot(true);

Is that correct?
The problem is:
If I open the project and only comment sth. out in a file and then try to update project view, nothing happens.
But if I first add a new line in the file and then update project view it works.



0
Avatar
Permanently deleted user

It is strange that these ways does not work. Could you please provide a minimal case to reproduce the issue?

0

Please sign in to leave a comment.