mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 22:25:25 +02:00
[247010] - Rolled back the check for session.isActive() before returning the adapter set.
This commit is contained in:
parent
8968ec763d
commit
66960d32ba
3 changed files with 21 additions and 11 deletions
|
@ -10,6 +10,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel;
|
||||
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import org.eclipse.dd.dsf.concurrent.DsfRunnable;
|
||||
import org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.SteppingController.ISteppingControlParticipant;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||
|
@ -32,11 +34,13 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
|||
public AbstractDebugVMAdapter(DsfSession session, final SteppingController controller) {
|
||||
super(session);
|
||||
fController = controller;
|
||||
fController.getExecutor().execute(new DsfRunnable() {
|
||||
public void run() {
|
||||
fController.addSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||
}
|
||||
});
|
||||
try {
|
||||
fController.getExecutor().execute(new DsfRunnable() {
|
||||
public void run() {
|
||||
fController.addSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||
}
|
||||
});
|
||||
} catch (RejectedExecutionException e) {} // Do nothing if session is shut down.
|
||||
}
|
||||
|
||||
private final SteppingController fController;
|
||||
|
@ -60,13 +64,13 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
|||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (!fController.getExecutor().isShutdown()) {
|
||||
try {
|
||||
fController.getExecutor().execute(new DsfRunnable() {
|
||||
public void run() {
|
||||
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (RejectedExecutionException e) {} // Do nothing if session is shut down.
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,9 +187,12 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
|
|||
|
||||
PDALaunch launch = (PDALaunch)adaptableObject;
|
||||
|
||||
// check for valid session
|
||||
// Check for valid session.
|
||||
// Note: even if the session is no longer active, the adapter set
|
||||
// should still be returned. This is because the view model may still
|
||||
// need to show elements representing a terminated process/thread/etc.
|
||||
DsfSession session = launch.getSession();
|
||||
if (session == null || !session.isActive()) return null;
|
||||
if (session == null) return null;
|
||||
|
||||
// Find the correct set of adapters based on the launch. If not found
|
||||
// it means that we have a new launch, and we have to create a
|
||||
|
|
|
@ -208,9 +208,12 @@ public class GdbAdapterFactory
|
|||
|
||||
GdbLaunch launch = (GdbLaunch)adaptableObject;
|
||||
|
||||
// check for valid session
|
||||
// Check for valid session.
|
||||
// Note: even if the session is no longer active, the adapter set
|
||||
// should still be returned. This is because the view model may still
|
||||
// need to show elements representing a terminated process/thread/etc.
|
||||
DsfSession session = launch.getSession();
|
||||
if (session == null || !session.isActive()) return null;
|
||||
if (session == null) return null;
|
||||
|
||||
// Find the correct set of adapters based on the launch session-ID. If not found
|
||||
// it means that we have a new launch and new session, and we have to create a
|
||||
|
|
Loading…
Add table
Reference in a new issue