private void convertToShared() {

		int openCount = getOpenFileCount();
		if (openCount != 0) {
			Msg.showInfo(getClass(), getComponent(), "Cannot Convert Project with Open Files",
				"Found " + openCount + " open project file(s).\n" +
					"Before your project can be converted, you must close\n" +
					"all open project files and tools.");
			return;
		}

		if (!checkToolsClose()) {
			return;
		}
		ProjectChooseRepositoryWizardModel model =
			new ProjectChooseRepositoryWizardModel(plugin.getTool(), "Convert Project");
		WizardDialog dialog = new WizardDialog(model);
		dialog.show(getComponent());

		RepositoryAdapter rep = model.getRepository();
		if (rep != null) {
			StringBuffer confirmMsg = new StringBuffer();
			confirmMsg.append("All version history on your files will be\n" +
				"lost after your project is converted and checkouts terminated.\n" +
				"Do you want to convert your project?\n");
			confirmMsg.append(" \n");
			confirmMsg.append("WARNING: Convert CANNOT be undone!");

			if (OptionDialog.showOptionDialog(getComponent(), "Confirm Convert Project",
				confirmMsg.toString(), "Convert",
				OptionDialog.WARNING_MESSAGE) == OptionDialog.OPTION_ONE) {
				// put the conversion in a task
				ConvertProjectTask task = new ConvertProjectTask(rep);
				new TaskLauncher(task, getComponent(), 500);
				// block until task completes
				ProjectLocator projectLocator = project.getProjectLocator();
				if (task.getStatus()) {
					close();
					FileActionManager actionMgr = plugin.getFileActionManager();
					actionMgr.closeProject(false);
					actionMgr.openProject(projectLocator);
					plugin.getProjectActionManager().showProjectInfo();
				}
				else {
					Msg.trace(this, "Convert project task failed");
				}
			}
		}
	}
Called from the project action manager when the connection state changes on the
repository.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ProjectInfoDialog.java