Examples of AddCommandDisplayPart


Examples of org.cloudfoundry.ide.eclipse.server.ui.internal.tunnel.AddCommandDisplayPart

  public void createControl(Composite parent) {

    ServiceCommandWizard wizard = (ServiceCommandWizard) getWizard();

    displayPart = wizard.getContextServiceCommand() != null ? new AddCommandDisplayPart(wizard.getService(),
        wizard.getContextServiceCommand()) : new AddCommandDisplayPart(wizard.getService(), wizard
        .getCommands().getDefaultTerminal());
    displayPart.addPartChangeListener(new IPartChangeListener() {

      public void handleChange(PartChangeEvent event) {
        if (event != null) {
View Full Code Here

Examples of org.cloudfoundry.ide.eclipse.server.ui.internal.tunnel.AddCommandDisplayPart

        : false;
  }

  @Override
  public boolean performFinish() {
    AddCommandDisplayPart part = page != null ? page.getCommandPart() : null;

    if (part != null) {
      editedCommand = new ServiceCommandManager(commands).createCommand(part.getDisplayName());

      if (editedCommand != null) {
        // External application location should never be null
        ExternalApplication appInfo = new ExternalApplication();
        appInfo.setExecutableNameAndPath(part.getExecutableLocation());
        editedCommand.setExternalApplication(appInfo);

        // Options and terminal may be optional
        String optionsVal = part.getOptions();
        if (optionsVal != null) {
          optionsVal = optionsVal.trim();
        }
        if (optionsVal != null && optionsVal.length() > 0) {
          CommandOptions options = new CommandOptions();
          options.setOptions(optionsVal);
          editedCommand.setOptions(options);
        }
        else {
          editedCommand.setOptions(null);
        }

        String terminalLocationVal = part.getTerminal();
        if (terminalLocationVal != null) {
          terminalLocationVal = terminalLocationVal.trim();
        }
        if (terminalLocationVal != null && terminalLocationVal.length() > 0) {
          CommandTerminal terminal = new CommandTerminal();
          terminal.setTerminal(terminalLocationVal);
          editedCommand.setCommandTerminal(terminal);
        }
        else {
          editedCommand.setCommandTerminal(null);
        }

        List<EnvironmentVariable> envVars = part.getEnvironmentVariables();
        if (envVars != null && !envVars.isEmpty()) {
          editedCommand.setEnvironmentVariables(envVars);
        }
        else {
          editedCommand.setEnvironmentVariables(null);
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.