boolean () { if (myModuleProfiles.isEmpty()) { return false; } final TreePath selectionPath = myTree.getSelectionPath(); return selectionPath != null && selectionPath.getLastPathComponent() instanceof MyModuleNode; }