/** This is the reason for this thread. We launch the remote process and wait until it returns. */ @Override public void run() { fireCreationEvent(); // // We wait for build changes. We never update during a build // and we will wait a bit after a build ends. // UpdateGuard guard = new UpdateGuard(context) { @Override protected void update() { LaunchThread.this.update(); } }; guard.open(); try { exitValue = session.launch(); } catch (Exception e) { logger.logWarning("Exception from launcher", e); e.printStackTrace(); } finally { guard.close(); terminate(); } }