}
}
ISourceLocator srcLocator = new JavaSourceLocator(
javaProjects.toArray(new IJavaProject[javaProjects.size()]), true);
ILaunch launch = new Launch(config, ILaunchManager.DEBUG_MODE, srcLocator);
IProgressMonitor monitor = null;
Map<String, String> args = new HashMap<String, String>();
args.put(KEY_HOSTNAME, host);
args.put(KEY_PORT, String.valueOf(port));
SocketAttachConnector connector = new SocketAttachConnector();
try {
connector.connect(args, monitor, launch);
} catch (CoreException e) {
throw new RuntimeException(
"Debug VM not available at " + host + ":" + port + ". " +
"Check hostname and port number.");
}
this.debugTarget = launch.getDebugTarget();
}