use of org.eclipse.ui.views.contentoutline.ContentOutline in project tdi-studio-se by Talend.
the class TalendTabbedPropertySheetPage method selectionChanged.
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
ISelection newSelection;
if (part instanceof AbstractMultiPageTalendEditor) {
AbstractMultiPageTalendEditor mpte = (AbstractMultiPageTalendEditor) part;
newSelection = mpte.getTalendEditor().getViewer().getSelection();
if (selection instanceof StructuredSelection) {
StructuredSelection structSel = (StructuredSelection) newSelection;
if (structSel.size() != 1) {
return;
}
if (structSel.getFirstElement() instanceof EditPart) {
if (structSel.equals(oldSelection)) {
// if (getCurrentTab() != null) {
// getCurrentTab().setInput(part, selection);
// }
} else {
super.selectionChanged(part, selection);
}
oldSelection = structSel;
}
}
} else if (part instanceof ContentOutline) {
ContentOutline outline = (ContentOutline) part;
newSelection = outline.getSelection();
if (selection instanceof StructuredSelection) {
StructuredSelection structSel = (StructuredSelection) newSelection;
if (structSel.size() != 1) {
return;
}
if (structSel.getFirstElement() instanceof NodeTreeEditPart) {
if (structSel.equals(oldSelection)) {
// this.getCurrentTab().setInput(part, selection);
} else {
super.selectionChanged(part, selection);
}
oldSelection = structSel;
}
}
}
}
Aggregations