use of com.jopdesign.jopeclipse.internal.core.JavaDown in project jop by jop-devel.
the class JavaDownLaunchConfigurationDelegate method launch.
@Override
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
if (CommonTab.isLaunchInBackground(configuration)) {
System.err.println("Launch in background");
}
try {
// JOPize
int jopizerExitValue = jopize(configuration, mode, launch, monitor);
IPath jopizedFile = getJopizedFile(configuration);
if (configuration.getAttribute(IJOPLaunchConfigurationConstants.ATTR_SIMULATE, true)) {
// configuration.getAttribute("SIMULATE", false)) {
simulate(configuration, mode, launch, monitor);
} else {
JavaDown downloader = new JavaDown();
boolean usb = useUsbDownload(configuration);
String portName = configuration.getAttribute(IJOPLaunchConfigurationConstants.ATTR_COM_PORT, "");
downloader.setCommPortId(portName);
downloader.useUSB(usb);
downloader.setJopFile(jopizedFile);
downloader.run(monitor);
}
} catch (Exception e) {
JOPUtils.abort(e.getLocalizedMessage(), e, 0);
}
}
Aggregations