release/2.1.2 #24
|
@ -199,12 +199,16 @@ public class DesignBrowser {
|
||||||
@Override
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
ISelection selection=event.getSelection();
|
ISelection selection=event.getSelection();
|
||||||
if( selection instanceof IStructuredSelection) {
|
if( selection instanceof IStructuredSelection) {
|
||||||
Object object= ((IStructuredSelection)selection).getFirstElement();
|
Object object= ((IStructuredSelection)selection).getFirstElement();
|
||||||
if(object instanceof IHierNode&& ((IHierNode)object).getChildNodes().size()!=0){
|
if(object instanceof IHierNode && ((IHierNode)object).getChildNodes().size()!=0){
|
||||||
txTableViewer.setInput(object);
|
txTableViewer.setInput(object);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
else { //if selection is changed but empty
|
||||||
|
txTableViewer.setInput(null);
|
||||||
|
updateButtons();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -250,8 +254,8 @@ public class DesignBrowser {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
selectionService.setSelection(event.getSelection());
|
selectionService.setSelection(event.getSelection());
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue