NewGroup - Adding items based on the context


Refer to the two screen shots above.

GUI Form on new item pop up will only appear if only the directory currently selected is the source directory.
I have a similar requirement that items I add to new item group should only appear once user right click on source direcotory only.
How to achieve this. ?

1 comment
Comment actions Permalink

In your implementation of AnAction.update(), call getPresentation().setVisible(false) if the current context does not match the context in which your action needs to be available.


Please sign in to leave a comment.