@Override
	public List<DockingActionIf> getPopupActions(Tool dockingTool, ActionContext context) {
		if (!(context instanceof DataTypesActionContext)) {
			return null;
		}
		DataTypesActionContext dtContext = (DataTypesActionContext) context;
		GTreeNode selectedNode = dtContext.getClickedNode();
		if (!(selectedNode instanceof ArchiveNode)) {
			return null;
		}

		List<DockingActionIf> actions = new ArrayList<>();

		ArchiveNode archiveNode = (ArchiveNode) selectedNode;
		Archive archive = archiveNode.getArchive();
		DataTypeManager dataTypeManager = archive.getDataTypeManager();
		if (dataTypeManager == null) {
			return null;
		}

		String group = "FGroup"; // after 'Edit'
		List<SourceArchive> sourceArchives = dataTypeManager.getSourceArchives();
		for (SourceArchive sourceArchive : sourceArchives) {
			DataTypeManager sourceDTM = dataTypeManagerHandler.getDataTypeManager(sourceArchive);
			boolean canUpdate = canUpdate(sourceArchive, sourceDTM);
			boolean canCommit = canCommit(sourceArchive, sourceDTM);
			actions.add(new SyncRefreshAction(this, dataTypeManagerHandler, dataTypeManager,
				archiveNode, sourceArchive, true));
			actions.add(new CommitAction(this, dataTypeManagerHandler, dataTypeManager, archiveNode,
				sourceArchive, canCommit));
			actions.add(new UpdateAction(this, dataTypeManagerHandler, dataTypeManager, archiveNode,
				sourceArchive, canUpdate));
			actions.add(new RevertAction(this, dataTypeManagerHandler, dataTypeManager, archiveNode,
				sourceArchive, canCommit));
			actions.add(new DisassociateAction(this, dataTypeManagerHandler, dataTypeManager,
				archiveNode, sourceArchive));
		}

		// the current actions are all pull-right actions--set their group
		for (DockingActionIf action : actions) {
			MenuData popupData = action.getPopupMenuData();
			String pullRightName = popupData.getMenuPath()[0];
			tool.setMenuGroup(new String[] { pullRightName }, group);
		}

		UpdateSourceArchiveNamesAction action =
			new UpdateSourceArchiveNamesAction(this, dataTypeManager);
		action.getPopupMenuData().setMenuGroup(group);
		actions.add(action);
		return actions;
	}
Create the actions for the menu on the tool.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypeManagerPlugin.java