void (@NotNull AnActionEvent e) { Object sourceComponent = getSourceComponent(e); if (sourceComponent instanceof JTree) { performOn((JTree)sourceComponent); } else if (sourceComponent instanceof TreeTable) { performOn(((TreeTable)sourceComponent).getTree()); } }