}
// monitor.worked(step);
System.out.println("Running ACA with: " + config.getName());
ILaunch acaRunLaunch = launch(config, ILaunchManager.DEBUG_MODE);
setActiveLaunch(acaRunLaunch);
IDebugTarget target = acaRunLaunch.getDebugTarget();
completedTargets.add((DestecsDebugTarget) target);
File outputFolder = target == null ? null
: ((DestecsDebugTarget) target).getOutputFolder();
while (!acaRunLaunch.isTerminated())
{
internalSleep(100);
}
if (acaRunLaunch != null && !acaRunLaunch.isTerminated())
{
acaRunLaunch.terminate();
}
setActiveLaunch(null);
@SuppressWarnings("unchecked")
Map<Object, Object> attributes = config.getAttributes();
String data = "** launch summery for ACA: " + config.getName();
for (Map.Entry<Object, Object> entry : attributes.entrySet())
{
data += entry.getKey() + " = " + entry.getValue() + "\n";
}
data += "\n\n----------------------- MEMENTO -------------------------------\n\n";
data += config.getMemento();
if (outputFolder != null)
{
try
{
FileWriter outFile = new FileWriter(new File(outputFolder, "launch"));
PrintWriter out = new PrintWriter(outFile);
out.println(data);
out.close();
} catch (IOException e)
{
e.printStackTrace();
}
}
internalSleep(1000);// just let the tools calm down.
} catch (Exception e)
{
DestecsDebugPlugin.logError("Error in AcaSimlation manager", e);
}
}
try
{
target.terminate();
} catch (DebugException e)
{
DestecsDebugPlugin.logError("Failed to terminate destecs target", e);
}
refreshProject();