wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, sketch.getMainType());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_WIDTH, sketch.getWidth());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_HEIGHT, sketch.getHeight());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_NAME, "Processing Sketch");
wc.setAttribute("wasLastBuildSuccessful", sketch.wasLastBuildSuccessful());
wc.setMappedResources(new IResource[] { sketch.getJavaProject().getUnderlyingResource() });
// config =wc.doSave();
config = wc; // this prevents a run config from being saved and sticking around.
} catch (CoreException ce) {
ProcessingPlugin.logError(ce);