Open the modal window by double clicking on the custom Project View tree item
I have a custom project view and want to open a modal window with settings instead code editor when the user double clicked on some elements.
Is my usecase already supported by intellij?
请先登录再写评论。
Does "custom project view" means that you have own AbstractProjectViewPSIPane with own nodes?
Then IDEA executes the following method to process every selected node that implement Navigatable
At this moment I use a class which extends ProjectViewPane and create my own nodes in getChildren() method.
I do not understand how OpenSourceUtil#navigate can help me.
I found EditSourceOnDoubleClickHandler and use its method
for implements custom behavior on double click. Is this a normal way?
No, it is applicable for your custom tree. The Project View tree has already installed a double click handler. And your handler may affect it.
Note, that your Runnable is called right after processing selected nodes, but it does not know about selection:
I recommend to implement the following methods in your ProjectViewNode:
Thanks, this method works fine.