Package org.springframework.ide.eclipse.wizard.template.infrastructure.ui

Examples of org.springframework.ide.eclipse.wizard.template.infrastructure.ui.WizardUIInfo$OrderComparator


          // this
          // call back is no longer needed
          getWizard().getMainPage().refreshTemplateInUI();
        }

        WizardUIInfo info = getUIInfo(template);

        if (info == null || !hasTemplateWizardPages()) {
          // Update the buttons so that the "Next" button is disabled.
          // This is done
          // indirectly by the wizard which calls hasNext() once
          // again to determine the button states based on data
          // already downloaded.
          getWizard().getContainer().updateButtons();
          return null;
        }

        ITemplateWizardPage previousPage = null;

        ITemplateWizardPage templatePage = null;

        ITemplateWizardPage firstPage = null;

        try {

          for (int i = 0; i < info.getPageCount(); i++) {

            List<WizardUIInfoElement> pageElements = info.getElementsForPage(i);
            if (pageElements == null || pageElements.isEmpty()) {
              continue;
            }
            templatePage = new NewTemplateWizardPage(info.getPage(i).getDescription(), template,
                new TemplateInputCollector(pageElements));
            templatePage.setWizard(getWizard());

            // Always set a new first template page, as the template
            // selection may have changed and may
View Full Code Here


        // now, and therefore
        // either have a template wizard page that can be checked for
        // completeness or indicate it did not provide pages.

        if (TemplateUtils.hasBeenDownloaded(template)) {
          WizardUIInfo info = getUIInfo(template);

          if (info == null) {
            canFinish = false;
          }
          else {
            canFinish = info.getPageCount() == 0 || info.getElementsForPage(0) == null
                || info.getElementsForPage(0).isEmpty()
                || (firstTemplatePage != null && firstTemplatePage.isPageComplete());
          }

        }
        else {
View Full Code Here

    // by default assume it does. Later, after its been downloaded, if it
    // turns out that the template did
    // not contribute any pages, the wizard buttons will be updated
    // accordingly.
    if (TemplateUtils.hasBeenDownloaded(template)) {
      WizardUIInfo info = getUIInfo(template);

      return info != null && info.getPageCount() > 0 && info.getElementsForPage(0) != null
          && !info.getElementsForPage(0).isEmpty();
    }

    return true;
  }
View Full Code Here

  @Override
  public ProjectConfiguration getProjectConfiguration() throws CoreException {

    Template template = getWizard().getModel().selectedTemplate.getValue();

    final WizardUIInfo uiInfo = getUIInfo(template);

    if (uiInfo == null) {
      throw new CoreException(new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID,
          "Failed to read template wizard UI info file for template: " + template.getName()
              + ". Check the template installation location and verify that the files are accessible."));
    }

    String projectName = getWizard().getModel().projectName.getValue();
    String uriValue = getWizard().getModel().projectLocation.getValue();
    URI uri = uriValue != null ? new File(uriValue).toURI() : null;

    TemplateProjectConfigurationDescriptor descriptor = new TemplateProjectConfigurationDescriptor(
        uiInfo.getProjectNameToken(), projectName, uiInfo.getTopLevelPackageTokens(), template, uri,
        getTemplateInputHandlers(), getWizard().getMainPage().getVersion());

    return new TemplateProjectConfiguration(descriptor, getWizard().getShell());
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.wizard.template.infrastructure.ui.WizardUIInfo$OrderComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.