Problem with ViewSettings passed to TreeStructureProvider

The ViewSettings parameter passed to modify() always returns false for viewSettings.isShowMembers(), both if "Show Members" is active/inactive, both in Project/Packages view. Is this a bug?

5 comments

Another question: how can I force a repaint (not refresh!) of the project view panel? I tried all methods on ProjectView.getInstance(project) I found to no avail..

0

answering myself: using ((ProjectViewNode)node).getSettings() instead of parameter viewSettings does the trick

0

Yann, did you solve the (repaint) problem? I'm having a similar problem that
cannot be cured by calling ProjectView.refresh(), but it's not a real
repaint-problem as well: I have a TreeStructureProvider that replaces certain
nodes by custom PsiFileNodes that show a modified icon and can also have some
children.

I have verified that after calling ProjectView.refresh() my provider's modify()
method is called and the method correctly replaces the PsiFileNode, but the
changed icon doesn't show up unless I collapse and re-expand the parent node.
It's not a simple repaint-issue though because e.g. hiding the ProjectView or
scrolling the affected node(s) out of sight doesn't help as well.

I have no idea how to update ProjectView so that the change is reflected
immediately and to me it looks like the node-icons (and the fact whether a node
has children or not) are cached too aggressively.

Anybody got an idea what could help?

Thanks,
Sascha

Yann Cebron wrote:

Another question: how can I force a repaint (not refresh!) of the project view panel? I tried all methods on ProjectView.getInstance(project) I found to no avail..


0

Sascha Weinreuter wrote:

Anybody got an idea what could help?


Hello? TreeStructureProvider is in the OpenAPI. I'd appreciate a response
whether/how a proper refresh of the Project View is possible or not.

Sascha

0

okidoki

ProjectView.getInstance(project).refresh();

now works as expected in Demetra, but how to refresh the editor tabs?

EditorFactory.getInstance().refreshAllEditors();

doesn't help..

0

Please sign in to leave a comment.