@Override
	public void save() {

		if (toolManager == null) {
			return;
		}

		Element root = new Element("PROJECT");

		Set<Entry<String, ToolTemplate>> configEntrySet = projectConfigMap.entrySet();
		for (Entry<String, ToolTemplate> entry : configEntrySet) {
			String key = entry.getKey();
			ToolTemplate template = entry.getValue();

			Element elem = new Element(PROJECT_TOOL_CONFIG_XML_NAME);
			elem.setAttribute("NAME", key);
			elem.addContent(template.saveToXml());
			root.addContent(elem);
		}

		Set<Entry<String, SaveState>> entrySet = dataMap.entrySet();
		for (Entry<String, SaveState> entry : entrySet) {
			SaveState saveState = entry.getValue();
			Element element = new Element(PROJECT_DATA_XML_NAME);
			element.setAttribute("NAME", entry.getKey());
			element.addContent(saveState.saveToXml());
			root.addContent(element);
		}

		for (ProjectLocator view : getProjectViews()) {
			Element elem;
			if (!view.isTransient()) {
				elem = new Element(OPEN_VIEW_XML_NAME);
				elem.setAttribute("NAME", view.getName());
				elem.setAttribute("LOCATION", view.getLocation());
			}
			else {
				elem = new Element(OPEN_REPOSITORY_VIEW_XML_NAME);
				elem.setAttribute("URL", view.getURL().toExternalForm());
			}
			root.addContent(elem);
		}

		try {
			// save tool state
			root.addContent(toolManager.saveToXml()); // the tool manager will save the open tools' state
			File saveFile = new File(projectData.getProjectDir(), PROJECT_STATE);
			OutputStream os = new FileOutputStream(saveFile);
			Document doc = new Document(root);
			XMLOutputter xmlOut = new GenericXMLOutputter();
			xmlOut.output(doc, os);
			os.close();

			changed = false;

		}
		catch (Exception e) {
			Msg.showError(this, null, "Error", "Error saving project", e);
		}
		if (projectManager != null) {
			projectManager.updatePreferences();
		}
	}
Get the local tool chest for the user logged in.

@return the tool chest
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/DefaultProject.java