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

		TreePath[] selectionPaths = getSelectionPaths(context);
		StandAloneDataTypeManager dtm = getModifiableProjectOrFileDTM(selectionPaths);
		if (dtm != null && canExecute(dtm)) {
			setPopupMenuData(getMenuData(getNextName(dtm)));
			return true;
		}
		setPopupMenuData(getMenuData(null));
		return false;
	}
Execute the undo/redo operation on the specified archive datatype manager.
@param dtm archive datatype manager
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/AbstractUndoRedoArchiveTransactionAction.java