Search in sources :

Example 1 with Activator

use of org.eclipse.xtext.ui.internal.Activator in project xtext-eclipse by eclipse.

the class PreferenceStoreAccessImpl method getPreferenceStore.

@Override
public IPreferenceStore getPreferenceStore() {
    lazyInitialize();
    Activator activator = Activator.getDefault();
    if (activator != null)
        return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(), activator.getPreferenceStore(), EditorsUI.getPreferenceStore() });
    return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(), EditorsUI.getPreferenceStore() });
}
Also used : Activator(org.eclipse.xtext.ui.internal.Activator) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Example 2 with Activator

use of org.eclipse.xtext.ui.internal.Activator in project xtext-eclipse by eclipse.

the class PreferenceStoreAccessImpl method getContextPreferenceStore.

@Override
public IPreferenceStore getContextPreferenceStore(Object context) {
    lazyInitialize();
    // may be null on shutdown
    Activator activator = Activator.getDefault();
    if (activator != null)
        return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(context), activator.getPreferenceStore(), EditorsUI.getPreferenceStore() });
    return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(context), EditorsUI.getPreferenceStore() });
}
Also used : Activator(org.eclipse.xtext.ui.internal.Activator) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Aggregations

IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)2 ChainedPreferenceStore (org.eclipse.ui.texteditor.ChainedPreferenceStore)2 Activator (org.eclipse.xtext.ui.internal.Activator)2