private void openRestoredProject() {
		try {
			SwingUtilities.invokeAndWait(() -> {
				ProjectManager pm = plugin.getTool().getProjectManager();
				try {
					Project project = pm.openProject(projectLocator, true, true);
					pm.rememberProject(projectLocator);
					FrontEndTool tool = (FrontEndTool) plugin.getTool();
					tool.setActiveProject(project);
				}
				catch (NotOwnerException e) {
					// can't happen since resetOwner is true
				}
				catch (Exception e) {
					Msg.info(this,
						"Restore Archive: Error opening project: " + projectLocator.getName());

					Msg.showError(this, null, "Restore Archive Error",
						"Failed to open newly restored project", e);
				}
			});
		}
		catch (InvocationTargetException | InterruptedException e) {
			// ignore
		}
	}
Task that restores a Ghidra Project Archive file (a zip file with a .gar extension)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java