OSGiLaunchDef def = new OSGiLaunchDef();
def.setProjectName(project.getName());
def.getTargetPlugins().addAll(OSGiLaunchDef.getTargetDefinitions());
def.getWorkbenchPlugins().add(new PluginLaunchDef(project.getName()));
try {
ByteArrayInputStream in = new ByteArrayInputStream(new OSGiAppLaunchGenerator().generate(def).toString().getBytes());
f.create(in, true, monitor);
in.close();
} catch (CoreException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();