@Override
	public void run(TaskMonitor monitor) throws CancelledException {

		TaskMonitor subMonitor = monitor;
		if (list.size() > 1) {
			subMonitor = new CancelOnlyWrappingTaskMonitor(monitor);
		}

		monitor.initialize(list.size());
		for (GTreeNode node : list) {
			monitor.checkCancelled();

			if (node instanceof DomainFolderNode) {
				monitor.setMessage("Pasting folder");
				pasteFolder(((DomainFolderNode) node).getDomainFolder(), subMonitor);
			}
			else if (node instanceof DomainFileNode) {
				monitor.setMessage("Pasting file");
				pasteFile(((DomainFileNode) node).getDomainFile(), subMonitor);
			}

			monitor.incrementProgress(1);
		}

		if (hasFailedCopy) {
			Msg.showWarn(this, null, "Paste Failure(s)",
				"Unable to paste all nodes (see log for details)");
		}
	}
Constructor for PasteFileTask.
 
@param destNode destination folder
@param list list of GTreeNodes being pasted
@param isCut boolean flag, true means source nodes were cut instead of copied.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/PasteFileTask.java