void (@NotNull final AnActionEvent e) { final XDebuggerTree tree = XDebuggerTree.getTree(e); XWatchesView watchesView = e.getData(XWatchesView.DATA_KEY); boolean enabled = tree != null && watchesView != null && isEnabled(e, tree); e.getPresentation().setEnabled(enabled); }