@Override
			public boolean isEnabledForContext(ActionContext context) {
				if (!(context instanceof ProgramTreeActionContext ptac)) {
					return false;
				}

				if (!ptac.hasSingleNodeSelection()) {
					return false;
				}

				if (ptac.isOnlyRootNodeSelected()) {
					return true;
				}

				ProgramNode node = ptac.getSingleSelectedNode();
				return !node.isFragment();
			}
Get the action for the tree.

@return PluginAction[]
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionManager.java