Example usage for org.eclipse.jface.preference StringFieldEditor getPreferenceName

List of usage examples for org.eclipse.jface.preference StringFieldEditor getPreferenceName

Introduction

In this page you can find the example usage for org.eclipse.jface.preference StringFieldEditor getPreferenceName.

Prototype

public String getPreferenceName() 

Source Link

Document

Returns the name of the preference this field editor operates on.

Usage

From source file:com.blackducksoftware.integration.eclipseplugin.preferences.BlackDuckPreferences.java

License:Apache License

private void storeValues() throws HubIntegrationException {
    final IPreferenceStore prefStore = getPreferenceStore();
    final StringFieldEditor[] editors = hubAuthorizationConfig.getEditors();
    for (final StringFieldEditor editor : editors) {
        prefStore.setValue(editor.getPreferenceName(), editor.getStringValue());
    }/*from  w  w  w . j  a  v  a  2  s .co  m*/
    securePrefService.saveSecurePreference(SecurePreferenceNames.HUB_PASSWORD,
            hubAuthorizationConfig.getHubPasswordField().getText(), true);
    securePrefService.saveSecurePreference(SecurePreferenceNames.PROXY_PASSWORD,
            hubAuthorizationConfig.getProxyPasswordField().getText(), true);
    Activator.getPlugin()
            .updateHubConnection(hubAuthorizationConfig.validateCredentialFields().getConnection());
}

From source file:org.eclipse.cdt.internal.autotools.ui.properties.AutotoolsCategoryPropertyOptionPage.java

License:Open Source License

public void propertyChange(PropertyChangeEvent event) {
    // allow superclass to handle as well
    super.propertyChange(event);

    if (event.getSource() instanceof StringFieldEditor) {
        StringFieldEditor f = (StringFieldEditor) event.getSource();
        cfg.setOption(f.getPreferenceName(), f.getStringValue());
    } else if (event.getSource() instanceof BooleanFieldEditor) {
        BooleanFieldEditor b = (BooleanFieldEditor) event.getSource();
        cfg.setOption(b.getPreferenceName(), Boolean.toString(b.getBooleanValue()));
    }/*ww  w  .  j ava2  s  .  c  om*/
}

From source file:org.eclipse.ptp.remotetools.preferences.events.FollowBeginStringFieldEditorPropertyChangeListener.java

License:Open Source License

/**
 * /*from w  w w . j  a  va 2  s.co m*/
 */
public FollowBeginStringFieldEditorPropertyChangeListener(StringFieldEditor stringFieldEditor,
        Composite parent) {
    this.stringFieldEditor = stringFieldEditor;
    this.textControl = stringFieldEditor.getTextControl(parent);
    this.display = this.textControl.getDisplay();
    this.preferenceStore = stringFieldEditor.getPreferenceStore();
    this.preferenceName = stringFieldEditor.getPreferenceName();
}