private void delete(ProgramTreeActionContext context) {

		ProgramDnDTree tree = context.getTree();
		int transactionID = tree.startTransaction("Delete");
		if (transactionID < 0) {
			return;
		}
		boolean success = false;
		try {
			synchronized (root) {
				TreePath[] paths = context.getSelectionPaths();
				success = delete(tree, paths);
			}
		}
		finally {
			tree.endTransaction(transactionID, success);
		}
	}
Delete node(s) from the tree; called from the action listener
on the menu.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionManager.java