Package org.eclipse.php.internal.ui.preferences.util

Examples of org.eclipse.php.internal.ui.preferences.util.Key


      inner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      group.setClient(inner);

      for (Validator v : category.getValidators()) {
        for (Type t : v.getTypes()) {
          Combo combo = fields[i] = addComboBox(inner, t.getLabel(), new Key(PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID + "/" + v.getId(), t.getId()), getSeverityValues(), getSeverityLabels());
          Label object = (Label)fLabels.get(combo);
          object.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
          i++;
        }
      }
View Full Code Here


    if (fProject == null || hasProjectSpecificOptions(fProject)) {
      fDisabledProjectSettings = null;
    } else {
      fDisabledProjectSettings = new IdentityHashMap();
      for (int i = 0; i < allKeys.length; i++) {
        Key curr = allKeys[i];
        fDisabledProjectSettings.put(curr,
            curr.getStoredValue(fLookupOrder, false, fManager));
      }
    }

    settingsUpdated();
View Full Code Here

  protected final IWorkbenchPreferenceContainer getPreferenceContainer() {
    return fContainer;
  }

  protected static Key getKey(String plugin, String key) {
    return new Key(plugin, key);
  }
View Full Code Here

  protected void settingsUpdated() {
  }

  public void selectOption(String key, String qualifier) {
    for (int i = 0; i < fAllKeys.length; i++) {
      Key curr = fAllKeys[i];
      if (curr.getName().equals(key)
          && curr.getQualifier().equals(qualifier)) {
        selectOption(curr);
      }
    }
  }
View Full Code Here

    String oldValue = setValue(data.getKey(), newValue);
    validateSettings(data.getKey(), oldValue, newValue);
  }

  protected void textChanged(Text textControl) {
    Key key = (Key) textControl.getData();
    String number = textControl.getText();
    String oldValue = setValue(key, number);
    validateSettings(key, oldValue, number);
  }
View Full Code Here

  }

  private boolean getChanges(IScopeContext currContext, List changedSettings) {
    boolean needsBuild = false;
    for (int i = 0; i < fAllKeys.length; i++) {
      Key key = fAllKeys[i];
      String oldVal = key.getStoredValue(currContext, null);
      String val = key.getStoredValue(currContext, fManager);
      if (val == null) {
        if (oldVal != null) {
          changedSettings.add(key);
          needsBuild |= !oldVal.equals(key.getStoredValue(
              fLookupOrder, true, fManager));
        }
      } else if (!val.equals(oldVal)) {
        changedSettings.add(key);
        needsBuild |= oldVal != null
            || !val.equals(key.getStoredValue(fLookupOrder, true,
                fManager));
      }
    }
    return needsBuild;
  }
View Full Code Here

  public void useProjectSpecificSettings(boolean enable) {
    boolean hasProjectSpecificOption = fDisabledProjectSettings == null;
    if (enable != hasProjectSpecificOption && fProject != null) {
      if (enable) {
        for (int i = 0; i < fAllKeys.length; i++) {
          Key curr = fAllKeys[i];
          String val = (String) fDisabledProjectSettings.get(curr);
          curr.setStoredValue(fLookupOrder[0], val, fManager);
        }
        fDisabledProjectSettings = null;
        updateControls();
      } else {
        fDisabledProjectSettings = new IdentityHashMap();
        for (int i = 0; i < fAllKeys.length; i++) {
          Key curr = fAllKeys[i];
          String oldSetting = curr.getStoredValue(fLookupOrder,
              false, fManager);
          fDisabledProjectSettings.put(curr, oldSetting);
          curr.setStoredValue(fLookupOrder[0], null, fManager); // clear
          // project
          // settings
        }
      }
    }
View Full Code Here

  protected abstract String[] getFullBuildDialogStrings(
      boolean workspaceSettings);

  public void performDefaults() {
    for (int i = 0; i < fAllKeys.length; i++) {
      Key curr = fAllKeys[i];
      String defValue = curr.getStoredValue(fLookupOrder, true, fManager);
      setValue(curr, defValue);
    }

    settingsUpdated();
    updateControls();
View Full Code Here

  /**
   * @since 3.1
   */
  public void performRevert() {
    for (int i = 0; i < fAllKeys.length; i++) {
      Key curr = fAllKeys[i];
      String origValue = curr.getStoredValue(fLookupOrder, false, null);
      setValue(curr, origValue);
    }

    settingsUpdated();
    updateControls();
View Full Code Here

    String currValue = getValue(data.getKey());
    curr.setSelection(data.getSelection(currValue) == 0);
  }

  protected void updateText(Text curr) {
    Key key = (Key) curr.getData();

    String currValue = getValue(key);
    if (currValue != null) {
      curr.setText(currValue);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.ui.preferences.util.Key

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.