VCS context menu
I cannot for the life of me figure out how the state of the context menu for VCS plugins is managed. How do I enable (and disable) menu items on the context menu when the file's state changes?
At the moment, I can add, and then add, and then add again. Interesting, but not really very useful...
请先登录再写评论。
Hello Gary,
You'll need to check the status of the file from the update() method of your
action and set presentation.setEnabled() accordingly. See AddAction.isEnabled()
in SVN plugin for an example.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thx. Got it.