public void setSelectionProvider(ISelectionProvider aSelectionProvider) { editorSite.setSelectionProvider(aSelectionProvider); }
public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); site.setSelectionProvider(new PostMultiPageSelectionProvider(this)); }
/** * Overrides super to plug in a different selection provider. */ @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); site.setSelectionProvider(new FormEditorSelectionProvider(this)); }
/** * Overrides super to plug in a different selection provider. */ @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); site.setSelectionProvider(new FormEditorSelectionProvider(this)); }
/** * The <code>MultiPageEditorPart</code> implementation of this * <code>IEditorPart</code> method sets its site to the given site, its * input to the given input, and the site's selection provider to a * <code>MultiPageSelectionProvider</code>. Subclasses may extend this * method. * * @param site * The site for which this part is being created; must not be * <code>null</code>. * @param input * The input on which this editor should be created; must not be * <code>null</code>. * @throws PartInitException * If the initialization of the part fails -- currently never. */ public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); site.setSelectionProvider(new SashEditorSelectionProvider(this)); }
/** * The <code>MultiPageEditorPart</code> implementation of this * <code>IEditorPart</code> method sets its site to the given site, its * input to the given input, and the site's selection provider to a * <code>MultiPageSelectionProvider</code>. Subclasses may extend this * method. * * @param site * The site for which this part is being created; must not be * <code>null</code>. * @param input * The input on which this editor should be created; must not be * <code>null</code>. * @throws PartInitException * If the initialization of the part fails -- currently never. */ @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); site.setSelectionProvider(new MultiPageSelectionProvider(this)); }
/** * This is called during startup. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException, PartInitException, PartInitException, PartInitException, PartInitException, PartInitException, PartInitException, PartInitException, PartInitException, PartInitException { setSite(site); setInputWithNotify(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); }
/** * Creates the pages of the multi-page editor. */ protected void createPages() { selectionProvider = getSelectionManager(); createGraphPage(); createSourcePage(); getEditorSite().setSelectionProvider(selectionProvider); model = buildModel(); // (IFileEditorInput)getEditorInput()); initializeGraphicalViewer(); floatingToolbar.setModel(model); int pageIndexToShow = getDefaultPageTypeIndex(); setActivePage(pageIndexToShow); }
/** * {@inheritDoc} */ @Override public void init(IEditorSite editorSite, IEditorInput editorInput) throws PartInitException { // check for valid input if (!(editorInput instanceof RootEditorInput)) { throw new PartInitException("Invalid Input: Must be RootEditorInput"); } // set site and input setSite(editorSite); setInput(editorInput); setTitleImage(ImageFormatter.getOverlayedEditorImage(getInputDefinition().getEditorPropertiesData().getPartImage(), getInputDefinition().getRepositoryDefinition(), resourceManager)); this.subView = SubViewFactory.createSubView(getInputDefinition().getId()); this.subView.setRootEditor(this); this.subView.init(); editorSite.setSelectionProvider(new MultiSubViewSelectionProvider(this)); InspectIT.getDefault().getCmrRepositoryManager().addCmrRepositoryChangeListener(this); InspectIT.getDefault().getInspectITStorageManager().addStorageChangeListener(this); }
/** * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm) */ protected void createFormContent(IManagedForm managedForm) { Composite body = managedForm.getForm().getBody(); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(body); viewer = new DiffViewer(body, new CompositeRuler(), SWT.V_SCROLL | SWT.H_SCROLL); viewer.setEditable(false); GridDataFactory.fillDefaults().grab(true, true) .applyTo(viewer.getControl()); MenuManager manager = new MenuManager(); addEditorActions(manager); Menu menu = manager.createContextMenu(viewer.getTextWidget()); IEditorSite site = getEditorSite(); site.setSelectionProvider(viewer); site.registerContextMenu( AbstractTextEditor.COMMON_EDITOR_CONTEXT_MENU_ID, manager, viewer, true); site.registerContextMenu( AbstractTextEditor.DEFAULT_EDITOR_CONTEXT_MENU_ID, manager, viewer, true); viewer.getTextWidget().setMenu(menu); formatDiff(); } }