mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 01:35:39 +02:00
Bug 233116: Cancelling an Attach or post-mortem launch should be graceful
This commit is contained in:
parent
18cae2a524
commit
60f2c4acc5
2 changed files with 16 additions and 2 deletions
|
@ -129,7 +129,9 @@ public class GdbConnectCommand implements IConnect {
|
|||
try {
|
||||
PrompterInfo info = new PrompterInfo(fNewProcessSupported, fProcessList);
|
||||
Object result = prompter.handleStatus(processPromptStatus, info);
|
||||
if (result instanceof Integer || result instanceof String) {
|
||||
if (result == null) {
|
||||
fRequestMonitor.cancel();
|
||||
} else if (result instanceof Integer || result instanceof String) {
|
||||
fRequestMonitor.setData(result);
|
||||
} else {
|
||||
fRequestMonitor.setStatus(NO_PID_STATUS);
|
||||
|
@ -185,6 +187,11 @@ public class GdbConnectCommand implements IConnect {
|
|||
new PromptForPidJob(
|
||||
"Prompt for Process", newProcessSupported, procInfoList.toArray(new IProcessExtendedInfo[0]), //$NON-NLS-1$
|
||||
new DataRequestMonitor<Object>(fExecutor, rm) {
|
||||
@Override
|
||||
protected void handleCancel() {
|
||||
rm.cancel();
|
||||
rm.done();
|
||||
}
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
// New cycle, look for service again
|
||||
|
|
|
@ -388,7 +388,9 @@ public class FinalLaunchSequence extends ReflectionSequence {
|
|||
|
||||
try {
|
||||
Object result = prompter.handleStatus(filePrompt, null);
|
||||
if (result instanceof String) {
|
||||
if (result == null) {
|
||||
fRequestMonitor.cancel();
|
||||
} else if (result instanceof String) {
|
||||
fRequestMonitor.setData((String)result);
|
||||
} else {
|
||||
fRequestMonitor.setStatus(NO_CORE_STATUS);
|
||||
|
@ -421,6 +423,11 @@ public class FinalLaunchSequence extends ReflectionSequence {
|
|||
new PromptForCoreJob(
|
||||
"Prompt for post mortem file", //$NON-NLS-1$
|
||||
new DataRequestMonitor<String>(getExecutor(), requestMonitor) {
|
||||
@Override
|
||||
protected void handleCancel() {
|
||||
requestMonitor.cancel();
|
||||
requestMonitor.done();
|
||||
}
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
String newCoreFile = getData();
|
||||
|
|
Loading…
Add table
Reference in a new issue