@Override
	public void run(TaskMonitor monitor) {

		// Try to establish a socket connection to an already-running Eclipse.
		// If we can connect, we are done.
		try {
			connection = new EclipseConnection(null, new Socket(address, port));
			return;
		}
		catch (IOException e) {
			// Eclipse may not be started, so we'll try to launch it
		}

		// Get required Eclipse components.  If Eclipse hasn't been setup yet in Ghidra, present
		// the user with the options window, and when they close that window, try again to get
		// the required Eclipse components.
		File eclipseExecutableFile;
		try {
			eclipseExecutableFile = eclipseService.getEclipseExecutableFile();
		}
		catch (FileNotFoundException e1) {
			eclipseService.handleEclipseError(e1.getMessage(), true, null);
			try {
				eclipseExecutableFile = eclipseService.getEclipseExecutableFile();
			}
			catch (FileNotFoundException e2) {
				eclipseService.handleEclipseError(
					"Failed to launch Eclipse.  The required Eclipse components have not been configured.",
					false, null);
				return;
			}
		}

		// Make sure GhidraDev is installed in Eclipse.  If it's not, offer to install it for the 
		// user.  After offering, check again to see if it's installed.
		if (!isGhidraDevInstalled(eclipseService)) {
			eclipseService.offerGhidraDevInstallation(monitor);
			if (!isGhidraDevInstalled(eclipseService)) {
				eclipseService.handleEclipseError(
					"Failed to launch Eclipse.  The GhidraDev plugin has not been installed.",
					false, null);
				return;
			}
		}

		// Launch Eclipse
		monitor.setIndeterminate(true);
		monitor.setMessage("Launching Eclipse...");
		Process process = null;
		try {
			ProcessBuilder processBuilder = createEclipseProcessBuilder(eclipseExecutableFile,
				eclipseService.getEclipseWorkspaceDir(), eclipseService.getEclipseDropinsDir());
			processBuilder.redirectErrorStream(true);
			processBuilder.directory(eclipseExecutableFile.getParentFile());
			process = processBuilder.start();
		}
		catch (Exception e) {
			eclipseService.handleEclipseError(
				"Unexpected exception occurred while launching Eclipse.", false, null);
			return;
		}

		// Try to establish a socket connection to the Eclipse we just started
		int maxWaits = 200;
		monitor.setIndeterminate(false);
		monitor.initialize(maxWaits);
		monitor.setMessage("Connecting to Eclipse on port " + port + "...");
		for (int i = 0; i < maxWaits; i++) {
			if (monitor.isCancelled()) {
				return;
			}
			if (!process.isAlive()) {
				break;
			}

			try {
				connection = new EclipseConnection(process, new Socket(address, port));
				return;
			}
			catch (UnknownHostException e) {
				return;
			}
			catch (IOException e) {
				// We expect this while Eclipse is not yet initialized
			}

			try {
				Thread.sleep(500);
			}
			catch (InterruptedException ie) {
				// ignore and try again
			}
			monitor.incrementProgress(1);
		}
		eclipseService.handleEclipseError("Failed to connect to Eclipse on port " + port + ".", true,
			null);
	}
Constructs a new Eclipse connector task.

@param eclipseService The Eclipse integration service.
@param port The port to connect to Eclipse on.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/eclipse/EclipseConnectorTask.java