project.delete(true, null);
}
DestructingGuard destructingGuard = new DestructingGuard();
try {
Destructable lauchDestructor = new Destructable() {
public void destruct() {
if (!launch.hasChildren()) {
DebugPlugin.getDefault().getLaunchManager()
.removeLaunch(launch);
}
}
};
destructingGuard.addValue(lauchDestructor);
WorkspaceBridge.Factory bridgeFactory = new VProjectWorkspaceBridge.FactoryImpl(
projectNameBase);
final DebugTargetImpl target = new DebugTargetImpl(launch,
bridgeFactory, sourceWrapSupport,
getPresetSyncDirection());
Destructable targetDestructor = new Destructable() {
public void destruct() {
terminateTarget(target);
}
};
destructingGuard.addValue(targetDestructor);