boolean removeGroup(ProgramNode node, StringBuilder sb) {

		boolean changesMade = false;

		synchronized (root) {
			ProgramNode parent = (ProgramNode) node.getParent();
			if (parent == null) {
				return false; // node has already been removed
			}

			ProgramModule parentModule = node.getParentModule();
			try {
				if (parentModule.removeChild(node.getName())) {
					changesMade = true;
				}

				//domain object change listener will update the tree...
			}
			catch (NotEmptyException e) {
				sb.append(
					"\n" + node.getName() + " from " + parentModule.getName() + ": Not Empty");
			}
		}
		return changesMade;
	}
Remove a Group from its parent.
@param node node to remove
@param sb string buffer to use if there was an error
@return true if group was removed
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java