コード例 #1
0
  @Override
  public boolean saveProperties(final IProject project) {
    try {
      QualifiedName qualifiedName =
          new QualifiedName(
              ProjectBuildPropertyData.QUALIFIER,
              COptimalizationOptionsData.OPTIMIZATION_LEVEL_PROPERTY);
      String newValue = optimalizationLevel.getActualValue();
      String oldValue = project.getPersistentProperty(qualifiedName);
      if (newValue != null && !newValue.equals(oldValue)) {
        project.setPersistentProperty(qualifiedName, newValue);
      }

      qualifiedName =
          new QualifiedName(
              ProjectBuildPropertyData.QUALIFIER,
              COptimalizationOptionsData.OTHER_OPTIMIZATION_FLAGS_PROPERTY);
      newValue = otherFlags.getStringValue();
      oldValue = project.getPersistentProperty(qualifiedName);
      if (newValue != null && !newValue.equals(oldValue)) {
        project.setPersistentProperty(qualifiedName, newValue);
      }
    } catch (CoreException e) {
      ErrorReporter.logExceptionStackTrace(e);
      return false;
    }

    return true;
  }
コード例 #2
0
  @Override
  public void propertyChange(PropertyChangeEvent event) {
    // allow superclass to handle as well
    super.propertyChange(event);

    if (fInfo instanceof MultiResourceInfo) {
      MultiResourceInfo mri = (MultiResourceInfo) fInfo;
      if (event.getSource() == commandStringField) {
        mri.setToolsCommand(fTool, commandStringField.getStringValue());
        updateFields();
      } else if (event.getSource() == commandLinePatternField) {
        mri.setCommandLinePattern(fTool, commandLinePatternField.getStringValue());
      }
    } else {
      if (event.getSource() == commandStringField) {
        fTool.setToolCommand(commandStringField.getStringValue());
        updateFields();
      } else if (event.getSource() == commandLinePatternField) {
        fTool.setCommandLinePattern(commandLinePatternField.getStringValue());
      }
    }
  }
コード例 #3
0
 private String getProfileValue() {
   String userNameValue = userName.getStringValue();
   String passwordValue = password.getStringValue();
   String urlValue = url.getStringValue();
   return userNameValue + "," + passwordValue + "," + urlValue;
 }
コード例 #4
0
 private String[] getProfileNameValue() {
   String profileNameValue = profileName.getStringValue();
   return new String[] {profileNameValue, getProfileValue()};
 }