boolean isForeignSelection = !(part instanceof ContentOutline && ((ContentOutline) part)
.getCurrentPage() == this);
if (isForeignSelection) {
if (selection instanceof StructuredSelection) {
AnnotationSelection annotations = new AnnotationSelection((StructuredSelection) selection);
if (!annotations.isEmpty()) {
ISelection tableSelection = new StructuredSelection(new AnnotationTreeNode(mEditor
.getDocument(), annotations.getFirst()));
mTableViewer.setSelection(tableSelection, true);
}
}
}