@Override public IWorkbenchPage getPage() { return site.getPage(); }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { Utils.openEditor(page.getSite().getPage(), revision, monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } } };
protected boolean isOutlineViewActive() { IWorkbenchPart activePart = outlinePage.getSite().getPage().getActivePart(); return activePart instanceof ContentOutline; }
@Override protected void activate(ISelection selection) { fEditor.doSelectionChanged(selection); getSite().getPage().activate(fEditor); }
@Override protected void activate(ISelection selection) { fEditor.doSelectionChanged(selection); getSite().getPage().activate(fEditor); }
@Override protected void open(ISelection selection, boolean activate) { fEditor.doSelectionChanged(selection); if (activate) getSite().getPage().activate(fEditor); }
@Override protected void open(ISelection selection, boolean activate) { fEditor.doSelectionChanged(selection); if (activate) getSite().getPage().activate(fEditor); }
@Override public void dispose() { getSite().getPage().removeSelectionListener(this); super.dispose(); } }
@Override public void dispose() { if (fLinkingEnabled) { fLinkWithEditorListener.uninstall(getSite().getPage()); } super.dispose(); }
@Override public void dispose() { if (fLinkingEnabled) { fLinkWithEditorListener.uninstall(getSite().getPage()); } super.dispose(); }
public void setLinkingEnabled(boolean enabled) { if (fLinkingEnabled != enabled) { fLinkingEnabled= enabled; fToggleLinkingAction.setChecked(enabled); getDialogSettings().put(DIALOGSTORE_LINKEDITORS, enabled); if (enabled) { fLinkWithEditorListener.install(getSite().getPage()); } else { fLinkWithEditorListener.uninstall(getSite().getPage()); } } }
public void setLinkingEnabled(boolean enabled) { if (fLinkingEnabled != enabled) { fLinkingEnabled= enabled; fToggleLinkingAction.setChecked(enabled); getDialogSettings().put(DIALOGSTORE_LINKEDITORS, enabled); if (enabled) { fLinkWithEditorListener.install(getSite().getPage()); } else { fLinkWithEditorListener.uninstall(getSite().getPage()); } } }
@Override protected void showMatch(Match match, int offset, int length, boolean activate) throws PartInitException { IFile file= (IFile) match.getElement(); IWorkbenchPage page= getSite().getPage(); if (offset >= 0 && length != 0) { openAndSelect(page, file, offset, length, activate); } else { open(page, file, activate); } }
public void doubleClick(DoubleClickEvent event) { Object item = ((IStructuredSelection) event.getSelection()).getFirstElement(); if (item instanceof IBuild) { IBuild build = (IBuild) item; OpenHandler.fetchAndOpen(getSite().getPage(), build); } } });
@Override public void dispose() { super.dispose(); getSite().setSelectionProvider(null); getSite().getPage().removeSelectionListener(this); editor.removeAnnotationListener(editorChangeListener); }
@Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (getSite().getPage().getActiveEditor() == editor) { if (selection instanceof IStructuredSelection) { FeatureStructureSelection fsSelection = new FeatureStructureSelection( (IStructuredSelection) selection); if (fsSelection.size() == 1 && !pinAction.isChecked()) { // filter out selection which are cause by this view itself if (editView != part) { viewer.setInput(fsSelection.toList().get(0)); } } } } }
@Override public void dispose() { super.dispose(); getSite().getPage().removeSelectionListener(this); editor.removeAnnotationListener(this); editor.getCasDocumentProvider().getTypeSystemPreferenceStore(editor.getEditorInput()) .removePropertyChangeListener(styleListener); overlay.dispose(); Collection<Image> values = icons.values(); for (Image image : values) { image.dispose(); } }
@Override public void dispose() { super.dispose(); getSite().getPage().removeSelectionListener(this); editor.removeAnnotationListener(this); editor.getCasDocumentProvider().getTypeSystemPreferenceStore(editor.getEditorInput()) .removePropertyChangeListener(styleListener); overlay.dispose(); Collection<Image> values = icons.values(); for (Image image : values) { image.dispose(); } rutaImage.dispose(); }
@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); } } } }
@Override public void init(IPageBookViewPage page, IConsole console) { fPage = page; fConsole = (ProcessConsole) console; fRemoveTerminated = new ConsoleRemoveLaunchAction(fConsole.getProcess().getLaunch()); fRemoveAllTerminated = new ConsoleRemoveAllTerminatedAction(); fTerminate = new ConsoleTerminateAction(page.getSite().getWorkbenchWindow(), fConsole); fStdOut = new ShowStandardOutAction(); fStdErr = new ShowStandardErrorAction(); fView = (IConsoleView) fPage.getSite().getPage().findView(IConsoleConstants.ID_CONSOLE_VIEW); DebugPlugin.getDefault().addDebugEventListener(this); DebugUITools.getDebugContextManager().getContextService(fPage.getSite().getWorkbenchWindow()).addDebugContextListener(this); // contribute to toolbar IActionBars actionBars = fPage.getSite().getActionBars(); configureToolBar(actionBars.getToolBarManager()); // create handler and submissions for EOF fEOFHandler = new EOFHandler(); }