private boolean isJavaOutlinePageActive() { IWorkbenchPart part= getActivePart(); return part instanceof ContentOutline && ((ContentOutline)part).getCurrentPage() == fOutlinePage; }
private boolean isJavaOutlinePageActive() { IWorkbenchPart part= getActivePart(); return part instanceof ContentOutline && ((ContentOutline)part).getCurrentPage() == fOutlinePage; }
private boolean isAntOutlinePageActive() { IWorkbenchPart part = getActivePart(); return part instanceof ContentOutline && ((ContentOutline) part).getCurrentPage() == fOutlinePage; }
private boolean isJavaOutlinePageActive() { IWorkbenchPart part= getActivePart(); return part instanceof ContentOutline && ((ContentOutline)part).getCurrentPage() == fOutlinePage; }
&& ((ContentOutline) selectingPart).getCurrentPage() != null && ((ContentOutline) selectingPart).getCurrentPage() .getControl().isFocusControl()) { node = SelectionHelper.toNode((IStructuredSelection) selection);
public void partActivated(IWorkbenchPart p) { if (p instanceof ContentOutline) { if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { getActionBarContributor().setActiveEditor(GenModelEditor.this); setCurrentViewer(contentOutlineViewer); } } else if (p instanceof PropertySheet) { if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { getActionBarContributor().setActiveEditor(GenModelEditor.this); handleActivate(); } } else if (p == GenModelEditor.this) { handleActivate(); } } public void partBroughtToTop(IWorkbenchPart p)
@Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { boolean isForeignSelection = true; if (part instanceof ContentOutline) { ContentOutline contentOutline = (ContentOutline) part; IPage currentPage = contentOutline.getCurrentPage(); if (currentPage instanceof OutlinePageBook) { OutlinePageBook pageBook = (OutlinePageBook) currentPage; isForeignSelection = pageBook.getCasViewPage() != this; } } if (isForeignSelection && getSite().getPage().getActiveEditor() == editor) { if (selection instanceof StructuredSelection) { AnnotationSelection annotations = new AnnotationSelection((StructuredSelection) selection); if (!annotations.isEmpty()) { ISelection tableSelection = new StructuredSelection(new AnnotationTreeNode(editor .getDocument(), annotations.getFirst())); mTableViewer.setSelection(tableSelection, true); } } } }