Java 类org.eclipse.core.runtime.Preferences.IPropertyChangeListener 实例源码

项目:team-explorer-everywhere    文件:LegacyHTTPClientFactory.java   
@Override
public void configureClientProxy(
    final HttpClient httpClient,
    final HostConfiguration hostConfiguration,
    final HttpState httpState,
    final ConnectionInstanceData connectionInstanceData) {
    final Preferences preferences = TFSCommonUIClientPlugin.getDefault().getPluginPreferences();

    final IPropertyChangeListener preferenceChangeListener = new PreferenceChangeListener(httpClient);
    preferences.addPropertyChangeListener(preferenceChangeListener);
    httpClient.getParams().setParameter(PREFERENCE_CHANGE_LISTENER_KEY, preferenceChangeListener);

    configureProxy(httpClient);
}
项目:team-explorer-everywhere    文件:EclipseTFProxyServerSettingsFactory.java   
/**
 * {@inheritDoc}
 * <p>
 * The object returned is reconfigured with new values when Eclipse
 * preferences change.
 */
@Override
public TFProxyServerSettings newProxyServerSettings() {
    final DefaultTFProxyServerSettings proxyServerSettings = new DefaultTFProxyServerSettings(null);

    final Preferences preferences = TFSCommonUIClientPlugin.getDefault().getPluginPreferences();

    final IPropertyChangeListener preferenceChangeListener = new PreferenceChangeListener(proxyServerSettings);
    preferences.addPropertyChangeListener(preferenceChangeListener);
    listeners.put(proxyServerSettings, preferenceChangeListener);

    configureProxySettings(proxyServerSettings);

    return proxyServerSettings;
}
项目:workspacemechanic    文件:OldMechanicPreferences.java   
public static void addListener(IPropertyChangeListener listener) {
  Preferences prefs = getPreferences();
  prefs.addPropertyChangeListener(listener);
}
项目:workspacemechanic    文件:OldMechanicPreferences.java   
public static void removeListener(IPropertyChangeListener listener) {
  Preferences prefs = getPreferences();
  prefs.removePropertyChangeListener(listener);
}
项目:workspacemechanic    文件:MechanicPreferences.java   
public void addListener(IPropertyChangeListener listener) {
  OldMechanicPreferences.addListener(listener);
}
项目:workspacemechanic    文件:MechanicPreferences.java   
public void removeListener(IPropertyChangeListener listener) {
  OldMechanicPreferences.removeListener(listener);
}
项目:workspacemechanic    文件:IMechanicPreferences.java   
void addListener(IPropertyChangeListener listener);
项目:workspacemechanic    文件:IMechanicPreferences.java   
void removeListener(IPropertyChangeListener listener);