void setWorkspaceName(Workspace ws, String name) throws DuplicateNameException {

		if (wsMap.containsKey(name)) {
			throw new DuplicateNameException("Workspace named " + name + " already exists");
		}
		wsMap.remove(ws.getName());
		wsMap.put(name, ws);

		// fire property change event
		PropertyChangeEvent event =
			new PropertyChangeEvent(this, WORKSPACE_NAME_PROPERTY, ws.getName(), name);
		for (WorkspaceChangeListener l : changeListeners) {
			l.propertyChange(event);
		}
	}
Called by the workspace when it is updating its name;
causes a property change event to be fired.

@param ws workspace to rename
@param name new name of workspace

@throws DuplicateNameException if there already exists a workspace by the given name
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolManagerImpl.java