Search in sources :

Example 1 with ColorCache

use of org.python.pydev.shared_ui.ColorCache in project Pydev by fabioz.

the class PydevPlugin method getColorCache.

// End Images for the console
/**
 * @return
 */
public static ColorCache getColorCache() {
    PydevPlugin plugin = getDefault();
    if (plugin.colorCache == null) {
        final IPreferenceStore chainedPrefStore = PyDevUiPrefs.getChainedPrefStore();
        plugin.colorCache = new ColorCache(chainedPrefStore) {

            {
                chainedPrefStore.addPropertyChangeListener(new IPropertyChangeListener() {

                    @Override
                    public void propertyChange(PropertyChangeEvent event) {
                        if (fNamedColorTable.containsKey(event.getProperty())) {
                            reloadProperty(event.getProperty());
                        }
                    }
                });
            }
        };
    }
    return plugin.colorCache;
}
Also used : IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) ColorCache(org.python.pydev.shared_ui.ColorCache) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Aggregations

IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)1 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)1 ColorCache (org.python.pydev.shared_ui.ColorCache)1