mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 21:45:22 +02:00
Fixed an NPE related to refactoring.
This commit is contained in:
parent
9ff6415403
commit
cd357e26e8
1 changed files with 7 additions and 3 deletions
|
@ -37,6 +37,12 @@ public class DebugViewSelectionRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
|
|
||||||
public DebugViewSelectionRootLayoutNode(DsfExecutor executor, IWorkbenchWindow window) {
|
public DebugViewSelectionRootLayoutNode(DsfExecutor executor, IWorkbenchWindow window) {
|
||||||
super(executor);
|
super(executor);
|
||||||
|
ISelection selection = DebugContextManager.getDefault().getActiveContext(window);
|
||||||
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
fRootVMC = new RootVMC<Object>( this, ((IStructuredSelection)selection).getFirstElement() );
|
||||||
|
} else {
|
||||||
|
fRootVMC = new RootVMC<Object>( this, null );
|
||||||
|
}
|
||||||
DebugContextManager.getDefault().addDebugContextListener(this, window);
|
DebugContextManager.getDefault().addDebugContextListener(this, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,10 +109,8 @@ public class DebugViewSelectionRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
fRootVMC = new RootVMC<Object>( this, ((IStructuredSelection)selection).getFirstElement() );
|
fRootVMC = new RootVMC<Object>( this, ((IStructuredSelection)selection).getFirstElement() );
|
||||||
} else {
|
} else {
|
||||||
fRootVMC = null;
|
fRootVMC = new RootVMC<Object>( this, null );
|
||||||
}
|
}
|
||||||
// TODO: Do we need to generate a delta for the view? Or will Debug view
|
|
||||||
// selection change somehow cause a refresh anyway.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void contextChanged(ISelection selection, IWorkbenchPart part) {
|
public void contextChanged(ISelection selection, IWorkbenchPart part) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue