How to hide parent menu entry using the is_visible
?
Well, if there is the is_visible
for the children, why not for its parent?
I tried to use the is_visible
command as this bellow, but not success:
import sublime
import sublime_plugin
class AnacondaContextMenuVisibilityCommand(sublime_plugin.TextCommand):
def run(self, edit):
return False
def is_visible(self):
print( ' Calling AnacondaContextMenuVisibilityCommand is_visible...' )
return False
Does not work for this menu entry file:
[
{
"caption": "Anaconda",
"command": "anaconda_context_menu_visibility",
"id": "anaconda_context",
"children":
[
{
"command": "anaconda_goto",
"caption": "Goto Definition"
},
]
}
]
Related threads: