@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; }
@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()); } } }
private String getProfileValue() { String userNameValue = userName.getStringValue(); String passwordValue = password.getStringValue(); String urlValue = url.getStringValue(); return userNameValue + "," + passwordValue + "," + urlValue; }
private String[] getProfileNameValue() { String profileNameValue = profileName.getStringValue(); return new String[] {profileNameValue, getProfileValue()}; }