@Override
	public void actionPerformed(ActionContext context) {

		List<GTreeNode> allNodes = ((DataTypesActionContext) context).getSelectedNodes();
		List<GTreeNode> dtNodes = allNodes.stream()
				.filter(n -> n instanceof DataTypeNode)
				.collect(Collectors.toList());

		Archive dtArchive = getSingleDTArchive(dtNodes);
		if (dtArchive == null) {
			Msg.showInfo(this, getProviderComponent(), "Multiple Data Type Archives",
				"The currently selected nodes are from multiple archives.\n" +
					"Please select only nodes from a single archvie.");
			return;
		}

		if (!dtArchive.isModifiable()) {
			DataTypeUtils.showUnmodifiableArchiveErrorMessage(context.getSourceComponent(),
				"Disassociate Failed", dtArchive.getDataTypeManager());
			return;
		}

		if (isAlreadyAssociated((DataTypesActionContext) context)) {
			Msg.showInfo(this, getProviderComponent(), "Already Associated",
				"One or more of the currently selected nodes are already associated\n" +
					"with a source archive.");
			return;
		}

		List<Archive> archives = getDestinationArchives();
		if (archives.isEmpty()) {
			Msg.showInfo(this, getProviderComponent(), "No Source Archives Open",
				"No source archives open.  Please open the desired source archive.");
			return;
		}

		ChooseArchiveDialog dialog = new ChooseArchiveDialog(archives);
		dialog.show();
		if (dialog.isCancelled()) {
			return;
		}

		Archive destinationArchive = dialog.getArchive();
		Category destinationCategory = dialog.getCategory();

		DataTypeTreeCopyMoveTask task =
			new DataTypeTreeCopyMoveTask(destinationArchive, destinationCategory, dtNodes,
				ActionType.COPY, plugin.getProvider().getGTree(), plugin.getConflictHandler());
		task.setPromptToAssociateTypes(false); // do not prompt the user; they have already decided
		TaskLauncher.launch(task);
	}
Allows the user to associate the selected action with a source archive.  An associate data type
allows users to push changes to the source archive and to pull updates from the source archive.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/associate/AssociateDataTypeAction.java