Lines 15-21
Link Here
|
15 |
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor; |
15 |
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor; |
16 |
import org.eclipse.cdt.dsf.datamodel.IDMContext; |
16 |
import org.eclipse.cdt.dsf.datamodel.IDMContext; |
17 |
import org.eclipse.cdt.dsf.debug.service.IProcesses; |
17 |
import org.eclipse.cdt.dsf.debug.service.IProcesses; |
18 |
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext; |
18 |
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext; |
19 |
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData; |
19 |
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData; |
20 |
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractThreadVMNode; |
20 |
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractThreadVMNode; |
21 |
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants; |
21 |
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants; |
Lines 65-77
Link Here
|
65 |
count++; |
65 |
count++; |
66 |
|
66 |
|
67 |
IProcesses processService = getServicesTracker().getService(IProcesses.class); |
67 |
IProcesses processService = getServicesTracker().getService(IProcesses.class); |
68 |
final IProcessDMContext procDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IProcessDMContext.class); |
68 |
final IThreadDMContext threadDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IThreadDMContext.class); |
69 |
|
69 |
|
70 |
if (processService == null || procDmc == null) { |
70 |
if (processService == null || threadDmc == null) { |
71 |
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Service or handle invalid", null)); //$NON-NLS-1$ |
71 |
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Service or handle invalid", null)); //$NON-NLS-1$ |
72 |
} else { |
72 |
} else { |
73 |
processService.getExecutionData( |
73 |
processService.getExecutionData( |
74 |
procDmc, |
74 |
threadDmc, |
75 |
new ViewerDataRequestMonitor<IThreadDMData>(getExecutor(), update) { |
75 |
new ViewerDataRequestMonitor<IThreadDMData>(getExecutor(), update) { |
76 |
@Override |
76 |
@Override |
77 |
public void handleCompleted() { |
77 |
public void handleCompleted() { |
Lines 98-105
Link Here
|
98 |
} |
98 |
} |
99 |
|
99 |
|
100 |
protected void fillThreadDataProperties(IPropertiesUpdate update, IThreadDMData data) { |
100 |
protected void fillThreadDataProperties(IPropertiesUpdate update, IThreadDMData data) { |
101 |
update.setProperty(PROP_NAME, data.getName()); |
101 |
if (data.getName() != null && data.getName().length() > 0) { |
102 |
update.setProperty(ILaunchVMConstants.PROP_ID, data.getId()); |
102 |
update.setProperty(PROP_NAME, data.getName()); |
|
|
103 |
} |
104 |
|
105 |
IMIExecutionDMContext execDmc = findDmcInPath( |
106 |
update.getViewerInput(), update.getElementPath(), IMIExecutionDMContext.class); |
107 |
if (execDmc != null) { |
108 |
update.setProperty(ILaunchVMConstants.PROP_ID, Integer.toString(execDmc.getThreadId())); |
109 |
} |
110 |
update.setProperty(ILaunchVMConstants.PROP_ID2, data.getId()); |
103 |
} |
111 |
} |
104 |
|
112 |
|
105 |
private String produceThreadElementName(String viewName, IMIExecutionDMContext execCtx) { |
113 |
private String produceThreadElementName(String viewName, IMIExecutionDMContext execCtx) { |