protected void registerOutlineSwitchAction( ) { if ( registered == true ) return; // Register the switch action onto outline page Page reportMultiBookPage = (Page) ( (MultiPageReportEditor) getEditor( ) ).getOutlinePage( ); if ( reportMultiBookPage.getSite( ) != null ) { if ( reportMultiBookPage.getSite( ) .getActionBars( ) .getMenuManager( ) .find( getOutlineSwitchAction( ).getId( ) ) == null ) reportMultiBookPage.getSite( ) .getActionBars( ) .getMenuManager( ) .add( getOutlineSwitchAction( ) ); registered = true; } }
@Override protected PageRec doCreatePage(IWorkbenchPart part) { // Get the view IProcedureView view = (IProcedureView) part; // Create the page Page page = createMyPage(view.getProcId(), view.getProcName()); initPage(page); page.createControl(getPageBook()); return new PageRec(part, page); }
/************************************************************************** * *************************************************************************/ @Override protected Page createMyPage(String procedureId, String name) { IProcedureManager mgr = (IProcedureManager) ServiceManager.get(IProcedureManager.class); return new WatchVariablesPage(mgr.getProcedure(procedureId), this); }
/** * Implement the abstract method declared in PageBookView. * @param part the associated editor * @return if the PageBook was disposed, return null; otherwise return a new page record */ @Override protected PageRec doCreatePage(IWorkbenchPart part) { PageBook pageBook = getPageBook(); if (pageBook.isDisposed()) { return null; } IEditorPart editor = (IEditorPart)part; PlanEditorModel model = CommonUtils.getAdapter(part, PlanEditorModel.class); Page page = createPage(editor, model); initPage(page); UndoRedoUtils.setupUndoRedo(page.getSite().getActionBars(), getSite(), model.getUndoContext()); page.createControl(pageBook); return new PageRec(part, page); }
/** * If the editor has a TemplatePlanPage adapter, return it; otherwise create and return a * default page for the page book. * Implements the method from Eclipse class PageBookView that was left undeclared in * abstract superclass PlanPageBookView. * @param editor the plan editor part * @param model the model being edited * @return */ @Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { TemplatePlanPage templatePlanPage = CommonUtils.getAdapter(editor, TemplatePlanPage.class); if(templatePlanPage == null) { return (Page) createDefaultPage(this.getPageBook()); } // listen to the selection provider to determine if the tree viewer's selection needs to be updated return templatePlanPage; }
private void removeOutlineSwitchAction( ) { Page reportMultiBookPage = (Page) ( (MultiPageReportEditor) getEditor( ) ).getOutlinePage( ); if ( reportMultiBookPage.getSite( ) != null ) { reportMultiBookPage.getSite( ) .getActionBars( ) .getMenuManager( ) .remove( switchAction_ID ); registered = false; } }
public Page createPage(Object object) { SVNHistoryPage page = new SVNHistoryPage(object); return page; }
@Override protected Page createMyPage(String procedureId, String name) { return new OutlinePage(procedureId); }
@Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { return new PlanAdvisorPage(editor, model); }
@Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { return new InconsPage(editor, model); }
@Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { return new ProfileEffectsAndRequirementsPage(getViewSite(), editor, model); }
@Override protected Page createPageForEditor(IEditorPart editor) { return CommonUtils.getAdapter(editor, ProfileTreePage.class); }
@Override protected Page createPageForView(IViewPart view) { return null; }
@Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { return new ConstraintsPage(editor, model); }
@Override protected Page createPageForEditor(IEditorPart editorPart) { return new DetailPage(editorPart, getViewSite()); }
@Override protected Page createPageForView(IViewPart viewPart) { return new DetailPage(viewPart, getViewSite()); }
@Override protected Page createPage(IEditorPart editor, PlanEditorModel model) { return new PlanRulesPage(editor, model); }
public Page createPage(Object object) { LocalHistoryPage page = new LocalHistoryPage(); return page; }
/** * Creates a new <code>OpenActionGroup</code>. The group requires that the selection provided by * the page's selection provider is of type {@link IStructuredSelection}. * * @param page the page that owns this action group */ public OpenViewActionGroup(Page page) { createSiteActions(page.getSite(), null); }
/** * Creates a new <code>OpenActionGroup</code>. The group requires that the selection provided by * the given selection provider is of type {@link IStructuredSelection}. * * @param page the page that owns this action group * @param selectionProvider the selection provider used instead of the page selection provider. * @since 3.2 */ public OpenViewActionGroup(Page page, ISelectionProvider selectionProvider) { createSiteActions(page.getSite(), selectionProvider); }
/** * Creates a new <code>JavaSearchActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public TypeScriptSearchActionGroup(Page page) { this(page.getSite()); }
/** * Create a page for the given view. If unable to create a page, should return null. * * @param view * @return Page */ protected abstract Page createPageForView(IViewPart view);
/** * Create a page for the input of the given editor. If unable to create a page, should return null. * * @param editor * @return Page */ protected abstract Page createPageForEditor(IEditorPart editor);
/** * Implement in your subclass to create a page for the editor/model * @param editor the editor in which the page is being created * @param model the model which supplies content to the editor * @return the newly-created page */ protected abstract Page createPage(IEditorPart editor, PlanEditorModel model);
/** * Creates a new <code>JavaSearchActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public JavaSearchActionGroup(Page page) { this(page.getSite()); }
/** * Creates a new <code>CCPActionGroup</code>. The group requires that * the selection provided by the page's selection provider is of type * <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public CCPActionGroup(Page page) { this(page.getSite(), null, false); }
/** * Creates a new <code>OpenActionGroup</code>. The group requires * that the selection provided by the page's selection provider is * of type {@link IStructuredSelection}. * * @param page the page that owns this action group */ public OpenViewActionGroup(Page page) { createSiteActions(page.getSite(), null); }
/** * Creates a new <code>OpenActionGroup</code>. The group requires * that the selection provided by the given selection provider is * of type {@link IStructuredSelection}. * * @param page the page that owns this action group * @param selectionProvider the selection provider used instead of the * page selection provider. * * @since 3.2 */ public OpenViewActionGroup(Page page, ISelectionProvider selectionProvider) { createSiteActions(page.getSite(), selectionProvider); }
/** * Creates a new <code>FindOccurrencesInFileAction</code>. The action requires * that the selection provided by the page's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page providing context information for this action */ public FindOccurrencesInFileAction(Page page) { this(page.getSite()); }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public GenerateActionGroup(Page page) { this(page.getSite(), null); installQuickAccessAction(); }
/** * Creates a new <code>ShowActionGroup</code>. The action requires * that the selection provided by the page's selection provider is of type * <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public ShowActionGroup(Page page) { this(page.getSite()); }
/** * Creates a new <code>RefactorActionGroup</code>. The action requires * that the selection provided by the page's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public RefactorActionGroup(Page page) { this(page.getSite(), null); installQuickAccessAction(); }
/** * Creates a new <code>GenerateActionGroup</code>. The group * requires that the selection provided by the page's selection provider * is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param page the page that owns this action group */ public GenerateBuildPathActionGroup(Page page) { this(page.getSite(), page.getSite().getSelectionProvider()); }