@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); }
/** * {@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; }
public static void addListener(IPropertyChangeListener listener) { Preferences prefs = getPreferences(); prefs.addPropertyChangeListener(listener); }
public static void removeListener(IPropertyChangeListener listener) { Preferences prefs = getPreferences(); prefs.removePropertyChangeListener(listener); }
public void addListener(IPropertyChangeListener listener) { OldMechanicPreferences.addListener(listener); }
public void removeListener(IPropertyChangeListener listener) { OldMechanicPreferences.removeListener(listener); }
void addListener(IPropertyChangeListener listener);
void removeListener(IPropertyChangeListener listener);