Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 300096 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java (-9 / +18 lines)
Lines 14-19 Link Here
14
import java.util.LinkedList;
14
import java.util.LinkedList;
15
import java.util.List;
15
import java.util.List;
16
16
17
import org.eclipse.cdt.dsf.datamodel.DMContexts;
18
import org.eclipse.cdt.dsf.datamodel.IDMContext;
17
import org.eclipse.cdt.dsf.debug.service.IRunControl;
19
import org.eclipse.cdt.dsf.debug.service.IRunControl;
18
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
20
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
19
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
21
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
Lines 291-306 Link Here
291
            	// MIStoppedEvent ourselves
293
            	// MIStoppedEvent ourselves
292
            	if (cmd instanceof CLICommand<?>) {
294
            	if (cmd instanceof CLICommand<?>) {
293
                	IRunControl runControl = fServicesTracker.getService(IRunControl.class);
295
                	IRunControl runControl = fServicesTracker.getService(IRunControl.class);
294
                	IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
296
                	if (runControl != null) {
295
                	if (runControl != null && procService != null) {
297
                		IDMContext dmc = ((CLICommand<?>)cmd).getContext();
296
                		String groupId = MIProcesses.UNIQUE_GROUP_ID;
298
                		IExecutionDMContext execDmc = 
297
                		IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId);
299
                			DMContexts.getAncestorOfType(dmc, IExecutionDMContext.class);
298
                		IContainerDMContext processContainerDmc = procService.createContainerContext(procDmc, groupId);
300
            		
299
                		
301
                		if (execDmc == null) {
300
                		if (runControl.isSuspended(processContainerDmc) == false) {
302
                			IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
301
                			MIEvent<?> event = MIStoppedEvent.parse(processContainerDmc, id, rr.getMIResults());
303
                			if (procService != null) {
304
                				String groupId = MIProcesses.UNIQUE_GROUP_ID;
305
                				IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId);
306
                				execDmc = procService.createContainerContext(procDmc, groupId);
307
                			}
308
                		}
309
                		if (execDmc != null && runControl.isSuspended(execDmc) == false) {
310
                			MIEvent<?> event = MIStoppedEvent.parse(execDmc, id, rr.getMIResults());
302
                			fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
311
                			fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
303
            			}
312
                		}
304
            		}
313
            		}
305
            	}
314
            	}
306
            }
315
            }

Return to bug 300096