Examples of IWizardHandle


Examples of org.eclipse.wst.server.ui.wizard.IWizardHandle

    }
  }

  public CloudFoundryCredentialsPart(CloudFoundryServer cfServer, final WizardHandleContext context) {
    this(cfServer);
    IWizardHandle wizardHandle = context.getWizardHandle();
    if (wizardHandle != null) {
      wizardHandle.setTitle(NLS.bind(Messages.CloudFoundryCredentialsPart_TEXT_CREDENTIAL_WIZ_TITLE, service));
      wizardHandle.setDescription(Messages.SERVER_WIZARD_VALIDATOR_CLICK_TO_VALIDATE);
      ImageDescriptor banner = CloudFoundryImages.getWizardBanner(serverTypeId);
      if (banner != null) {
        wizardHandle.setImageDescriptor(banner);
      }

      runnableContext = context.getRunnableContext();
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.ui.wizard.IWizardHandle

        IRuntime runtime = getRuntimeDelegate().getRuntime();

        String runtimeName = runtime.getRuntimeType().getName();

        IWizardHandle wizard = getWizard();

        if (runtime == null) {
            wizard.setMessage("", IMessageProvider.ERROR);
            return;
        }

        IRuntimeWorkingCopy runtimeWC = getRuntimeDelegate().getRuntimeWorkingCopy();
        getRuntimeDelegate().setInstanceProperty("serverRootDirectory", installDir.getText());

        if (installDir.getText() == null || installDir.getText().length() == 0) {
            // installDir field has not been entered
            wizard.setMessage(Messages.bind(Messages.installDirInfo, runtimeName), IMessageProvider.NONE);
        } else {
            IStatus status = runtimeWC.validate(null);
            if (status == null || status.isOK()) {
                // a valid install found
                wizard.setMessage(Messages.bind(Messages.serverDetected, runtimeName), IMessageProvider.NONE);
            } else if (status.getCode() == GeronimoRuntimeDelegate.INCORRECT_VERSION) {
                if (status.getSeverity() == IStatus.ERROR) {
                    wizard.setMessage(status.getMessage(), IMessageProvider.ERROR);
                    return;
                }
                wizard.setMessage(status.getMessage(), IMessageProvider.WARNING);
            } else if (status.getCode() == GeronimoRuntimeDelegate.PARTIAL_IMAGE) {
                wizard.setMessage(status.getMessage(), IMessageProvider.ERROR);
                return;
            } else {
                File file = new Path(installDir.getText()).toFile();
                if (file.isDirectory()) {
                    String message = file.canWrite() ? Messages.noImageFound : Messages.cannotInstallAtLocation;
                    message = Messages.bind(message, runtimeName);
                    wizard.setMessage(message, IMessageProvider.ERROR);
                } else {
                    wizard.setMessage(Messages.noSuchDir, IMessageProvider.ERROR);
                }
                return;
            }

            if (!isValidVM()) {
                wizard.setMessage(Messages.bind(Messages.jvmWarning, runtimeName), IMessageProvider.WARNING);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.