Search in sources :

Example 1 with JavaDown

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);
    }
}
Also used : JavaDown(com.jopdesign.jopeclipse.internal.core.JavaDown) IPath(org.eclipse.core.runtime.IPath) IOException(java.io.IOException) CoreException(org.eclipse.core.runtime.CoreException)

Aggregations

JavaDown (com.jopdesign.jopeclipse.internal.core.JavaDown)1 IOException (java.io.IOException)1 CoreException (org.eclipse.core.runtime.CoreException)1 IPath (org.eclipse.core.runtime.IPath)1