Package org.cloudfoundry.ide.eclipse.server.core.internal.application

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.application.EnvironmentVariable


  protected void handleEdit() {
    boolean variableChanged = false;
    Shell shell = CloudUiUtil.getShell();
    List<EnvironmentVariable> selection = getViewerSelection();
    if (shell != null && selection != null && !selection.isEmpty()) {
      EnvironmentVariable toEdit = selection.get(0);
      VariableDialogue dialogue = new VariableDialogue(shell, toEdit);
      if (dialogue.open() == Window.OK) {
        variableChanged = updateVariables(dialogue.getEnvironmentVariable(), toEdit);
      }
    }
View Full Code Here


      String result = null;
      TableColumn column = viewer.getTable().getColumn(columnIndex);
      if (column != null) {
        ViewColumn serviceColumn = (ViewColumn) column.getData();
        if (serviceColumn != null) {
          EnvironmentVariable var = (EnvironmentVariable) element;
          switch (serviceColumn) {
          case Variable:
            result = var.getVariable();
            break;
          case Value:
            result = var.getValue();
            break;
          }
        }
      }
      return result;
View Full Code Here

    private Text value;

    public VariableDialogue(Shell shell, EnvironmentVariable envVar) {
      super(shell);
      this.envVar = new EnvironmentVariable();

      if (envVar != null) {
        this.envVar.setValue(envVar.getValue());
      }
      if (envVar != null) {
View Full Code Here

  }

  protected List<EnvironmentVariable> getEnvironmentVariables(String applicationName) {
    if ("psql".equals(applicationName)) { //$NON-NLS-1$
      EnvironmentVariable envVariable = new EnvironmentVariable();
      envVariable.setVariable("PGPASSWORD"); //$NON-NLS-1$
      envVariable.setValue("${" + TunnelOptions.password.name() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
      List<EnvironmentVariable> variables = new ArrayList<EnvironmentVariable>();
      variables.add(envVariable);

      return variables;
    }
View Full Code Here

      if (envMap != null) {
        List<EnvironmentVariable> variables = new ArrayList<EnvironmentVariable>();
        for (Entry<String, String> entry : envMap.entrySet()) {
          String varName = entry.getKey();
          if (varName != null) {
            EnvironmentVariable variable = new EnvironmentVariable();
            variable.setVariable(varName);
            variable.setValue(entry.getValue());
            variables.add(variable);
          }
        }
        deploymentInfo.setEnvVariables(variables);
      }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.core.internal.application.EnvironmentVariable

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.