mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 576884: Ignore unsuitable adapter when the UI layer isn't running
When the UI layer is running the correct terminate adapter is returned, when the UI layer is not running, the Launch.terminate code is a valid fallback, and the org.eclipse.debug.internal.core.commands.TerminateCommand is not an appropriate adapter to use. Change-Id: I3c4c273b78b4e5bc9fe521b4a24ef5443852d3c0
This commit is contained in:
parent
994ea12856
commit
e60ef74ebb
1 changed files with 11 additions and 0 deletions
|
@ -303,6 +303,17 @@ public class GdbLaunch extends DsfLaunch implements ITracedLaunch, ITargetedLaun
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (handler instanceof org.eclipse.debug.internal.core.commands.TerminateCommand) {
|
||||||
|
// The org.eclipse.debug.internal.core.commands.TerminateCommand adapter
|
||||||
|
// calls Launch#terminate (asynchronously) so don't use that adapter.
|
||||||
|
// This special case code is needed because of behaviour changes
|
||||||
|
// introduced in Platform. See Bug 576622 and Bug 576024. CDT, when running
|
||||||
|
// tests, was relying on the undocumented behaviour that meant getAdapter
|
||||||
|
// was returning null here.
|
||||||
|
super.terminate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LaunchCommandRequest req = new LaunchCommandRequest(new Object[] { this });
|
LaunchCommandRequest req = new LaunchCommandRequest(new Object[] { this });
|
||||||
handler.execute(req);
|
handler.execute(req);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue