@Override protected void setActivePage(int pageIndex) { // programmatic focus change wasHeaderActive= false; super.setActivePage(pageIndex); }
/** * Sets the active page super. * * @param pageIndex the new active page super */ public void setActivePageSuper (int pageIndex) { super.setActivePage(pageIndex); }
@Override protected void setActivePage(int pageIndex) { // programmatic focus change wasHeaderActive= false; super.setActivePage(pageIndex); }
@Override public IFormPage setActivePage(String pageId) { IFormPage page = super.setActivePage(pageId); if (page != null) updateContentOutline(page); return page; }
@Override public void linkActivated(HyperlinkEvent e) { String href = (String) e.getHref(); if (href.equals("content")) //$NON-NLS-1$ getEditor().setActivePage(ContentPage.PAGE_ID); else if (href.equals("environment")) //$NON-NLS-1$ getEditor().setActivePage(EnvironmentPage.PAGE_ID); }
/** * Sets the active page using the unique page identifier. * * @param pageId * the id of the page to switch to * @return page that was set active or <samp>null </samp> if not found. */ public IFormPage setActivePage(String pageId) { for (int i = 0; i < pages.size(); i++) { Object page = pages.get(i); if (page instanceof IFormPage) { IFormPage fpage = (IFormPage) page; if (fpage.getId().equals(pageId)) { setActivePage(i); return fpage; } } } return null; }
/** * Sets the active page using the unique page identifier. * * @param pageId * the id of the page to switch to * @return page that was set active or <samp>null </samp> if not found. */ public IFormPage setActivePage(String pageId) { for (int i = 0; i < pages.size(); i++) { Object page = pages.get(i); if (page instanceof IFormPage) { IFormPage fpage = (IFormPage) page; if (fpage.getId().equals(pageId)) { setActivePage(i); return fpage; } } } return null; }
@Override public void linkActivated(HyperlinkEvent e) { String pageId = fPluginButton.getSelection() ? DependenciesPage.PLUGIN_ID : DependenciesPage.FEATURE_ID; getPage().getEditor().setActivePage(pageId); } });
@Override protected void createPages() { super.createPages(); // preempt MultiPageEditorPart#createPartControl(Composite) if (getActivePage() == -1) { // create page control and initialize page, keep focus on header by calling super implementation super.setActivePage(0); } }
@Override protected void createPages() { super.createPages(); // preempt MultiPageEditorPart#createPartControl(Composite) if (getActivePage() == -1) { // create page control and initialize page, keep focus on header by calling super implementation super.setActivePage(0); } }
@Override public void linkActivated(HyperlinkEvent e) { String href = (String) e.getHref(); if (href.equals("command.generate")) { //$NON-NLS-1$ handleGenerate(); } else if (href.equals("navigate.overview")) { //$NON-NLS-1$ getPage().getEditor().setActivePage(OverviewPage.PAGE_ID); } } });
/** * Sets the active page using the unique page identifier and sets its input * to the provided object. * * @param pageId * the id of the page to switch to * @param pageInput * the page input * @return page that was set active or <samp>null </samp> if not found. */ public IFormPage setActivePage(String pageId, Object pageInput) { IFormPage page = setActivePage(pageId); if (page != null) { IManagedForm mform = page.getManagedForm(); if (mform != null) mform.setInput(pageInput); } return page; }
/** * Sets the active page using the unique page identifier and sets its input * to the provided object. * * @param pageId * the id of the page to switch to * @param pageInput * the page input * @return page that was set active or <samp>null </samp> if not found. */ public IFormPage setActivePage(String pageId, Object pageInput) { IFormPage page = setActivePage(pageId); if (page != null) { IManagedForm mform = page.getManagedForm(); if (mform != null) mform.setInput(pageInput); } return page; }
protected void doLinkActivated(Hyperlink link) { Object object = link.getData(); getPage().getEditor().setActivePage(morePageId, object); }
@Override public void linkActivated(HyperlinkEvent e) { String href = (String) e.getHref(); // try page references if (href.equals("info")) //$NON-NLS-1$ getEditor().setActivePage(InfoFormPage.PAGE_ID); if (href.equals("plugins")) //$NON-NLS-1$ getEditor().setActivePage(FeatureReferencePage.PAGE_ID); else if (href.equals("features")) //$NON-NLS-1$ getEditor().setActivePage(FeatureIncludesPage.PAGE_ID); else if (href.equals("dependencies")) //$NON-NLS-1$ getEditor().setActivePage(FeatureDependenciesPage.PAGE_ID); else if (href.equals("build")) //$NON-NLS-1$ getEditor().setActivePage(BuildPage.PAGE_ID); else if (href.equals("synchronize")) { //$NON-NLS-1$ { getEditor().setActivePage(FeatureReferencePage.PAGE_ID); final FeatureEditorContributor contributor = (FeatureEditorContributor) getPDEEditor().getContributor(); BusyIndicator.showWhile(e.display, () -> contributor.getSynchronizeAction().run()); } else if (href.equals("export")) { //$NON-NLS-1$ ((FeatureEditor) getPDEEditor()).getFeatureExportAction().run(); } else if (href.equals("siteProject")) { //$NON-NLS-1$ getEditor().doSave(null); final FeatureEditorContributor contributor = (FeatureEditorContributor) getPDEEditor().getContributor(); BusyIndicator.showWhile(e.display, () -> contributor.getNewSiteAction().run()); } }
private void createMoreButton() { moreButton = getManagedForm().getToolkit().createButton(container, "More...", //$NON-NLS-1$ SWT.PUSH); moreButton.addSelectionListener(widgetSelectedAdapter(e -> BusyIndicator.showWhile(getSection().getDisplay(), () -> getPage().getEditor().setActivePage(morePageId)))); moreButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); }
/** * @param previousFeatureSelected */ private void revertConfigurationPage(boolean previousFeatureSelected) { // Compare selection from before and after the refresh boolean currentFeatureSelected = fFeatureButton.getSelection(); if (previousFeatureSelected == currentFeatureSelected) { // No update required return; } // The configuration page needs to be updated IFormPage currentPage = getPage().getEditor().getActivePageInstance(); // If the current page is the configuration page, switch to the // overview page before doing the update; otherwise, widget disposed // errors may result if (currentPage instanceof DependenciesPage) { getPage().getEditor().setActivePage(OverviewPage.PAGE_ID); } ((ProductEditor) getPage().getEditor()).updateConfigurationPage(); }
@Override public void linkActivated(HyperlinkEvent e) { String href = (String) e.getHref(); if (href.equals("action.synchronize")) { //$NON-NLS-1$ ((ProductLauncherFormPageHelper) getLauncherHelper()).handleSynchronize(true); } else if (href.equals("action.export")) { //$NON-NLS-1$ if (getPDEEditor().isDirty()) getPDEEditor().doSave(null); new ProductExportAction(getPDEEditor()).run(); } else if (href.equals("configuration")) { //$NON-NLS-1$ String pageId = ((ProductLauncherFormPageHelper) getLauncherHelper()).getProduct().useFeatures() ? DependenciesPage.FEATURE_ID : DependenciesPage.PLUGIN_ID; getEditor().setActivePage(pageId); } else if (href.equals("multi-platform-wiki")) { //$NON-NLS-1$ openBrowser("https://wiki.eclipse.org/Building#Cross-platform_build"); //$NON-NLS-1$ } else super.linkActivated(e); }
getEditor().setActivePage(DependenciesPage.PAGE_ID); else if (href.equals("runtime")) //$NON-NLS-1$ getEditor().setActivePage(RuntimePage.PAGE_ID); else if (href.equals("extensions")) { //$NON-NLS-1$ if (getEditor().setActivePage(ExtensionsPage.PAGE_ID) == null) activateExtensionPages(ExtensionsPage.PAGE_ID); } else if (href.equals("ex-points")) { //$NON-NLS-1$ if (getEditor().setActivePage(ExtensionPointsPage.PAGE_ID) == null) activateExtensionPages(ExtensionPointsPage.PAGE_ID); } else if (href.equals("build")) { //$NON-NLS-1$ getPDEEditor().getContextManager().putContext(in, new BuildInputContext(getPDEEditor(), in, false)); getEditor().setActivePage(BuildPage.PAGE_ID); } else if (href.equals("export")) { //$NON-NLS-1$ getExportAction().run();
getMessagesToRootCause(ex))) { super.setActivePage(indexesIndex);