/** * Locates the page that this option is presented in and flags that the * option is required and is currently not set. The flagging is done by * setting the page incomplete and setting the error message that uses * option's message label. * * @param option * the option that is required and currently not set */ protected void flagErrorMessage ( final TemplateOption option, final String newMessage, final int newType ) { for ( int i = 0; i < getPageCount (); i++ ) { final WizardPage page = getPage ( i ); for ( final TemplateOption pageOption : getOptions ( i ) ) { if ( pageOption.equals ( option ) ) { page.setPageComplete ( false ); page.setMessage ( newMessage, newType ); } } } }
private List<StepDetail> setupPages(String projectname, Engine engine) throws Exception { int max = PreferenceManager.getMaxStepsForManualTestWizard(projectname); List<StepPage> all = new ArrayList<StepPage>(); int index = 0; while (engine.hasNextstep()) { StepPage p = computeNextPage(); if (p == null) continue; // System.out.println("title " + p.getTitle()); addPage(p); all.add(p); index++; if (index > max) { DialogManager.displayWarning(MessageUtil.getString("incomplete_steps_list_in_manual_wizard"), MessageUtil.getString("max_steps_reached_change_setting_in_preference_project")); break; } } index = 1; for (WizardPage wizardPage : all) { wizardPage.setMessage(" Step (" + index + "/" + all.size() + ")"); index++; } List<StepDetail> ret = all.stream().map(item -> item.getDetail()).collect(Collectors.toList()); return ret; }
/** * Locates the page that this option is presented in and flags that the * option is required and is currently not set. The flagging is done by * setting the page incomplete and setting the error message that uses * option's message label. * * @param option * the option that is required and currently not set */ protected void flagMissingRequiredOption(TemplateOption option) { WizardPage page = null; for (int i = 0; i < pages.size(); i++) { TemplatePage tpage = pages.get(i); ArrayList<TemplateOption> list = tpage.options; if (list.contains(option)) { page = tpage.page; break; } } if (page != null) { page.setPageComplete(false); String message = NLS.bind(PDEUIMessages.OptionTemplateSection_mustBeSet, option.getMessageLabel()); page.setErrorMessage(message); } }
/** * Locates the page that this option is presented in and flags that the * option has an error. The flagging is done by * setting the page incomplete and setting the error message with the * provided message prefixed by the option's message label. * * @param option * the option that is required and currently not set * @param msg * the message indicating the error for the given option */ protected void flagErrorOnOption(TemplateOption option, String msg) { WizardPage page = null; for (int i = 0; i < pages.size(); i++) { TemplatePage tpage = pages.get(i); ArrayList<TemplateOption> list = tpage.options; if (list.contains(option)) { page = tpage.page; break; } } if (page != null) { page.setPageComplete(false); String message = option.getMessageLabel()+": "+msg; page.setErrorMessage(message); } }
private void showStatus(IStatus status){ String message = status.getMessage(); if (message.length() == 0) message= null; switch (status.getSeverity()) { case IStatus.OK: setErrorMessage(null); setMessage(message); break; case IStatus.WARNING: setErrorMessage(null); setMessage(message, WizardPage.WARNING); break; case IStatus.INFO: setErrorMessage(null); setMessage(message, WizardPage.INFORMATION); break; default: setErrorMessage(message); setMessage(null); break; } }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page lblIp.setText("- IP: " + config.getDatabaseIp()); ((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of DatabaseInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); // Set global variable to false before every installation status page, // if it is not set and there are more than one component to be // installed, finish button will be enabled directly in the last // installation page. config.setInstallationFinished(false); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page lblIp.setText("- IP: " + config.getXmppIp()); ((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of XmppInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); // Set global variable to false before every installation status page, // if it is not set and there are more than one component to be // installed, finish button will be enabled directly in the last // installation page. config.setInstallationFinished(false); return super.getNextPage(); }
@Override public void addContentPages() { mainPage = getWizardNewProjectCreationPage(); this.addPage(mainPage); /* never add the reference page // only add page if there are already projects in the workspace if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) { referencePage = getWizardNewProjectReferencePage(); this.addPage(referencePage); } */ List<? extends WizardPage> additionalWizardPages = getAdditionalWizardPages(); if (additionalWizardPages != null) { for (WizardPage wizardPage : additionalWizardPages) { this.addPage(wizardPage); } } }
protected boolean runJob(IRunnableWithProgress runnable) { // Clear any errors ((WizardPage)getContainer().getCurrentPage()).setErrorMessage(null); _jobException = null; // Start the job try { getContainer().run(true, true, runnable); } catch (Exception e) { _jobException = e; } // Check for errors if (_jobException != null) { String msg = StringUtil.format("{0} : {1}", _jobException.getMessage(), BluemixUtil.getErrorText(_jobException)); ((WizardPage)getContainer().getCurrentPage()).setErrorMessage(msg); if (BluemixLogger.BLUEMIX_LOGGER.isErrorEnabled()) { BluemixLogger.BLUEMIX_LOGGER.errorp(this, "runJob", BluemixUtil.getRootCause(_jobException), "Error running job"); // $NON-NLS-1$ $NLE-AbstractBluemixWizard.Errorrunningjob-2$ } return false; } return true; }
@Override public void handlePageChanging(final PageChangingEvent event) { // Assume success event.doit = true; // Get the current and target pages WizardPage currPage = (WizardPage)event.getCurrentPage(); WizardPage targetPage = (WizardPage)event.getTargetPage(); if ((currPage instanceof AlwStartPage) && (targetPage instanceof AlwPropertiesPage)) { // Moving from first to second page LayoutConfig lc = getStartPage().getSelectedLayoutConfig(); if (lc != null) { String errorMsg = "This configuration is in a library that is not yet enabled in this application.\nEnabling the library will add it as a dependency in Xsp Properties.\nXsp Properties is currently open in another editor and cannot be modified.\nClose Xsp Properties in order to proceed."; // $NLX-ApplicationLayoutDropWizard.Thisconfigurationisinalibrarythat-1$ String proceedMsg = "This configuration is in a library that is not yet enabled in this application.\nEnabling the library will add it as a dependency in Xsp Properties.\nClick Continue to update your Xsp Properties."; // $NLX-ApplicationLayoutDropWizard.Thisconfigurationisinalibrarythat.1-1$ event.doit = WizardUtils.findStandardDefAndAddDependency(lc.facesDef.getNamespaceUri(), lc.tagName, _panelData.getDesignerProject(), errorMsg, proceedMsg); } } }
@Override public WizardPage getNextPage() { refreshData(); switch(dsType) { case DS_VIEW: if (!(pageData.wizardPage[2] instanceof WizardSubPageDataView)) { pageData.wizardPage[2] = new WizardSubPageDataView(pageData); ((Wizard)getWizard()).addPage(pageData.wizardPage[2]); } return(pageData.wizardPage[2]); case DS_DOC: if (!(pageData.wizardPage[2] instanceof WizardSubPageFormTable)) { pageData.wizardPage[2] = new WizardSubPageFormTable(pageData); ((Wizard)getWizard()).addPage(pageData.wizardPage[2]); } return(pageData.wizardPage[2]); } return null; }
@Override public WizardPage getNextPage() { refreshData(); // Get the Next Sub Main Page // If pages provide more Sub Pages this function // should be overridden int newPageNumber = getSubPageNumber()+1; if(newPageNumber < wizardData.getPageCount()) { WizardDataSub pd = wizardData.pageList.get(newPageNumber); if(pd != null) { if (pd.wizardPage[0] == null) { pd.wizardPage[0] = new WizardSubPageMain(pd); ((Wizard)getWizard()).addPage(pd.wizardPage[0]); } return(pd.wizardPage[0]); } } return null; }
@Override public WizardPage getNextPage() { refreshData(); if(wizardData.pageList.size() > 0) { // Add the first sub page WizardDataSub pd = wizardData.pageList.get(0); if (pd != null) { if (pd.wizardPage[0] == null) { pd.wizardPage[0] = new WizardSubPageMain(pd); ((Wizard)(getWizard())).addPage(pd.wizardPage[0]); } return(pd.wizardPage[0]); } } return(null); }
/** * Applies the given status to the status line of a wizard page. This method * is mostly used by subclasses upon receiving an event and setting a status * accordingly. * * @param status * the status */ protected void applyToStatusLine(IStatus status) { String message = status.getMessage(); if (message.length() == 0) { message = null; } switch (status.getSeverity()) { case IStatus.OK: this.setErrorMessage(null); this.setMessage(message); break; case IStatus.WARNING: this.setErrorMessage(null); this.setMessage(message, WizardPage.WARNING); break; case IStatus.INFO: this.setErrorMessage(null); this.setMessage(message, WizardPage.INFORMATION); break; default: this.setErrorMessage(message); this.setMessage(null); break; } }
public void addPages(Wizard wizard) { WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_SEQUENTIAL_EXTENDED_LANGUAGE); page.setTitle(WizardTemplateMessages.SequentialExtendedLanguageTemplate_title); page.setDescription(WizardTemplateMessages.SequentialExtendedLanguageTemplate_desc); wizard.addPage(page); markPagesAdded(); }
public void addPages(Wizard wizard) { WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_SEQUENTIAL_SINGLE_LANGUAGE); page.setTitle(WizardTemplateMessages.SequentialSingleLanguageTemplate_title); page.setDescription(WizardTemplateMessages.SequentialSingleLanguageTemplate_desc); wizard.addPage(page); markPagesAdded(); }
@Override public void addPages ( final Wizard wizard ) { if ( this.id == null ) { final WizardPage page = createPage ( 0, IHelpContextIds.TEMPLATE_DETAIL_VIEW ); page.setTitle ( Messages.DetailViewTemplate_Page_Title ); page.setDescription ( Messages.DetailViewTemplate_Page_Description ); wizard.addPage ( page ); markPagesAdded (); } }
@Override public void addPages ( final Wizard wizard ) { final WizardPage page = createPage ( 0, IHelpContextIds.TEMPLATE_CONNECTION ); page.setTitle ( "Connection" ); page.setDescription ( "Connection options" ); wizard.addPage ( page ); markPagesAdded (); }
/** * Returns options that are added to the provided wizard page. * * @param page * wizard page that hosts required options * @return array of options added to the provided wizard page */ public TemplateOption[] getOptions(WizardPage page) { for (int i = 0; i < pages.size(); i++) { TemplatePage tpage = pages.get(i); if (tpage.page.equals(page)) return getOptions(i); } return new TemplateOption[0]; }
/** * Resets the current page state by clearing the error message and making * the page complete, thereby allowing users to flip to the next page. */ protected void resetPageState() { if (pages.size() == 0) return; WizardPage firstPage = pages.get(0).page; IWizardContainer container = firstPage.getWizard().getContainer(); WizardPage currentPage = (WizardPage) container.getCurrentPage(); currentPage.setErrorMessage(null); currentPage.setPageComplete(true); }
public IWizardPage[] getWizardPages(boolean initializePages) { if (wizardPages == null || initializePages) { standardPage = new MergeWizardStandardPage("standard", Messages.StandardMergeInputProvider_selectMergeSource, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD)); //$NON-NLS-1$ revisionsPage = new MergeWizardRevisionsPage("revisions", Messages.StandardMergeInputProvider_selectRevisions, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD), standardPage); //$NON-NLS-1$ WizardPage[] pages = { standardPage, revisionsPage }; wizardPages = pages; } return wizardPages; }
public IWizardPage[] getWizardPages(boolean initializePages) { if (wizardPages == null || initializePages) { downloadPage = new MergeWizardDesktopDownloadPage("download", "Change-set merge", Activator.getDefault().getImageDescriptor(Activator.IMAGE_COLLABNET_WIZBAN)); //$NON-NLS-1$ WizardPage[] pages = { downloadPage }; wizardPages = pages; } return wizardPages; }
public IWizardPage[] getWizardPages(boolean initializePages) { if (wizardPages == null || initializePages) { standardPage = new MergeWizardStandardPage("standardBlock", Messages.BlockMergeInputProvider_selectMergeSource, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD), Messages.BlockMergeInputProvider_specifyLocations, false, false); //$NON-NLS-1$ revisionsPage = new MergeWizardRevisionsPage("revisionsBlock", Messages.BlockMergeInputProvider_selectRevisions, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD), standardPage, Messages.BlockMergeInputProvider_specifyRevisions); //$NON-NLS-1$ WizardPage[] pages = { standardPage, revisionsPage }; wizardPages = pages; } return wizardPages; }
public IWizardPage[] getWizardPages(boolean initializePages) { if (wizardPages == null || initializePages) { advancedPage = new MergeWizardAdvancedPage("advanced", Messages.AdvancedMergeInputProvider_selectMergeSource, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD)); //$NON-NLS-1$ WizardPage[] pages = { advancedPage }; wizardPages = pages; } return wizardPages; }
public IWizardPage[] getWizardPages(boolean initializePages) { if (wizardPages == null || initializePages) { standardPage = new MergeWizardStandardPage("standardUnblock", Messages.UnblockMergeInputProvider_selectMergeSource, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD), Messages.UnblockMergeInputProvider_specifyLocation, false, true); //$NON-NLS-1$ revisionsPage = new MergeWizardUnblockRevisionsPage("revisionsUnblock", Messages.UnblockMergeInputProvider_selectRevisions, Activator.getDefault().getImageDescriptor(Activator.IMAGE_MERGE_WIZARD), standardPage); //$NON-NLS-1$ WizardPage[] pages = { standardPage, revisionsPage }; wizardPages = pages; } return wizardPages; }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page lblIp.setText("- IP: " + config.getLdapIp()); ((ControlNextEvent) super.getNextPage()).setNextPageEventType( NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of DatabaseInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page String allIps = ""; for (Iterator<Entry<Integer, LiderNodeInfoModel>> iterator = config.getLiderNodeInfoMap() .entrySet().iterator(); iterator.hasNext();) { Entry<Integer, LiderNodeInfoModel> entry = iterator.next(); final LiderNodeInfoModel clusterNode = entry.getValue(); allIps += "-" + clusterNode.getNodeIp() + "\n"; } ipTextArea.setText(allIps); ((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of DatabaseInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); // Set global variable to false before every installation status page, // if it is not set and there are more than one component to be // installed, finish button will be enabled directly in the last // installation page. config.setInstallationFinished(false); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page String allIps = ""; for (Iterator<Entry<Integer, DatabaseNodeInfoModel>> iterator = config.getDatabaseNodeInfoMap() .entrySet().iterator(); iterator.hasNext();) { Entry<Integer, DatabaseNodeInfoModel> entry = iterator.next(); final DatabaseNodeInfoModel clusterNode = entry.getValue(); allIps += "-" + clusterNode.getNodeIp() + "\n"; } ipTextArea.setText(allIps); ((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of DatabaseInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); // Set global variable to false before every installation status page, // if it is not set and there are more than one component to be // installed, finish button will be enabled directly in the last // installation page. config.setInstallationFinished(false); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page lblIp.setText("- IP: " + config.getLiderIp()); ((ControlNextEvent) super.getNextPage()).setNextPageEventType( NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of LdapInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page lblIp.setText("- IP: " + config.getLdapIp()); ((ControlNextEvent) super.getNextPage()).setNextPageEventType( NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of LdapInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); return super.getNextPage(); }
@Override public IWizardPage getNextPage() { // Set the IP info in the opening of page String allIps = ""; for (Iterator<Entry<Integer, XmppNodeInfoModel>> iterator = config.getXmppNodeInfoMap() .entrySet().iterator(); iterator.hasNext();) { Entry<Integer, XmppNodeInfoModel> entry = iterator.next(); final XmppNodeInfoModel clusterNode = entry.getValue(); allIps += "-" + clusterNode.getNodeIp() + "\n"; } ipTextArea.setText(allIps); ((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE); // Set page complete to true, otherwise it does not go into getNextPage // method of DatabaseInstallationStatus page. ((WizardPage) super.getNextPage()).setPageComplete(true); // Set global variable to false before every installation status page, // if it is not set and there are more than one component to be // installed, finish button will be enabled directly in the last // installation page. config.setInstallationFinished(false); return super.getNextPage(); }
@Override public boolean canFinish() { // If current page is the last page of this wizard // and installation is finished then enable finish button. if (PageFlowHelper.isLastPage(config, (WizardPage) getContainer().getCurrentPage()) && config.isInstallationFinished()) { return true; } return false; }
public CloudFoundryCredentialsPart(CloudFoundryServer cfServer, WizardPage wizardPage) { this(cfServer); if (wizardPage != null) { wizardPage.setTitle(NLS.bind(Messages.CloudFoundryCredentialsPart_TEXT_CREDENTIAL_WIZ_TITLE, service)); wizardPage.setDescription(Messages.SERVER_WIZARD_VALIDATOR_CLICK_TO_VALIDATE); ImageDescriptor banner = CloudFoundryImages.getWizardBanner(serverTypeId); if (banner != null) { wizardPage.setImageDescriptor(banner); } runnableContext = wizardPage.getWizard() != null && wizardPage.getWizard().getContainer() != null ? wizardPage .getWizard().getContainer() : null; } }
public CloudSpacesSelectionPart(CloudSpacesDelegate cloudSpaceServerDelegate, CloudFoundryServer cloudServer, WizardPage wizardPage) { this.cloudSpaceServerDelegate = cloudSpaceServerDelegate; String serverTypeId = cloudServer.getServer().getServerType().getId(); wizardPage.setTitle(Messages.CloudSpacesSelectionPart_TEXT_ORG_AND_SPACE); wizardPage.setDescription(DEFAULT_DESCRIPTION); ImageDescriptor banner = CloudFoundryImages.getWizardBanner(serverTypeId); if (banner != null) { wizardPage.setImageDescriptor(banner); } }
public DockerFoundryCredentialsPart(DockerFoundryServer cfServer, WizardPage wizardPage) { this(cfServer); if (wizardPage != null) { wizardPage.setTitle(NLS.bind(Messages.DockerFoundryCredentialsPart_TEXT_CREDENTIAL_WIZ_TITLE, service)); wizardPage.setDescription(Messages.SERVER_WIZARD_VALIDATOR_CLICK_TO_VALIDATE); ImageDescriptor banner = DockerFoundryImages.getWizardBanner(serverTypeId); if (banner != null) { wizardPage.setImageDescriptor(banner); } runnableContext = wizardPage.getWizard() != null && wizardPage.getWizard().getContainer() != null ? wizardPage .getWizard().getContainer() : null; } }
public void addPages(Wizard wizard) { WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_SIMPLE_MT_MELANGE); page.setTitle(MelangeTemplateMessages.SimpleMTTemplate_title); page.setDescription(MelangeTemplateMessages.SimpleMTTemplate_desc); wizard.addPage(page); markPagesAdded(); }
public ModuleSelectionDialogButtonField(WizardPage page, IDialogFieldListener changeListener) { super(); this.page = page; this.browseButtonEnabled = true; setDialogFieldListener(changeListener); setContentAssistProcessor(new ModuleCompletionProcessor()); status = new StatusInfo(); }