boolean closeActiveProject() {
		if (activeProject == null) {
			return true;
		}
		try {
			return fileActionManager.closeProject(true);
		}
		catch (Exception e) {
			Msg.error(this, "Unexpected Exception: " + e.getMessage(), e); // Keep this.
			int result = OptionDialog.showOptionDialog(null, "Close Project Failed",
				"Error Description: [ " + e + " ]" + "\n" +
					"=====> Do you wish to exit Ghidra, possibly losing changes? <=====",
				"Exit Ghidra (Possibly Lose Changes)", OptionDialog.ERROR_MESSAGE);
			if (result == OptionDialog.CANCEL_OPTION) {
				return false;
			}
		}
		return true;
	}
sets the name of the project, using the default name if no project is active
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndPlugin.java