private void updateConnectionPanel(Project project) {
		repositoryLabel.setText("     ");
		connectionIconPanel.remove(connectionLabel);
		if (connectionButton != null) {
			connectionIconPanel.remove(connectionButton);
		}
		if (project == null || project.getRepository() == null) {
			connectionLabel = new GIconLabel(EMPTY_ICON);
			connectionIconPanel.add(connectionLabel);
			return;
		}

		RepositoryAdapter repository = project.getRepository();
		User user = null;
		boolean isConnected = repository.isConnected();
		connectionButton = new GButton(isConnected ? CONNECTED_ICON : DISCONNECTED_ICON);
		connectionButton.addActionListener(e -> connect());

		connectionButton.setContentAreaFilled(false);
		connectionButton.setSelected(isConnected);
		connectionButton
				.setBorder(isConnected ? BorderFactory.createBevelBorder(BevelBorder.LOWERED)
						: BorderFactory.createBevelBorder(BevelBorder.RAISED));
		connectionIconPanel.add(connectionButton);
		if (isConnected) {

			try {
				user = repository.getUser();
			}
			catch (IOException e) {
				Msg.debug(this, "Unexpected exception retrieving user from repository", e);
			}
		}
		repositoryLabel
				.setText("Project Repository:   " + repository.getName() + getAccessString(user));

		String serverName = repository.getServerInfo().getServerName();
		connectionButton.setToolTipText(
			isConnected ? "Connected as '" + repository.getServer().getUser() + "' to " + serverName
					: HTMLUtilities.toHTML(
						"Disconnected from " + serverName + "\nActivate this button to connect"));
	}
Popup up file chooser dialog so the user can select the
location for the exported tool file.
@param template template to export
@param msgSource source of status message for successful export
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndPlugin.java