Package org.cloudfoundry.ide.eclipse.server.ui.internal.wizards

Examples of org.cloudfoundry.ide.eclipse.server.ui.internal.wizards.ServiceCommandWizard


    ServerService service = getSelectedService();
    if (service != null) {
      ServiceCommand serviceCommandToEdit = !add ? getSelectedCommand() : null;

      ServiceCommandWizard wizard = new ServiceCommandWizard(serviceCommands, service, serviceCommandToEdit);
      Shell shell = getShell();

      if (shell != null) {
        WizardDialog dialog = new WizardDialog(shell, wizard);
        if (dialog.open() == Window.OK) {

          ServiceCommand editedCommand = wizard.getEditedServiceCommand();

          if (editedCommand != null) {
            // Add the new one
            boolean added = new ServiceCommandManager(serviceCommands).addCommand(service.getServiceInfo(),
                editedCommand);

            if (!added) {
              notifyStatusChange(CloudFoundryPlugin.getErrorStatus(Messages.ServiceTunnelCommandPart_ERROR_FAIL_TO_ADD
                  + editedCommand.getDisplayName()));
              return;
            }
            else {
              // Delete the old command
              if (serviceCommandToEdit != null) {
                deleteCommand(serviceCommandToEdit);
              }

              CommandTerminal updatedTerminal = wizard.applyTerminalToAllCommands() ? editedCommand
                  .getCommandTerminal() : null;

              setServiceCommandInput(service, editedCommand);
              applyTerminalToAllCommands(updatedTerminal);
            }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.ui.internal.wizards.ServiceCommandWizard

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.