if (project == null) return null;
SketchProject sketch = SketchProject.forProject(project);
ILaunchConfiguration config = null;
try{
ILaunchConfigurationType configType = getConfigurationType();
ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, project.getName());
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");