List of usage examples for org.eclipse.jface.preference PreferenceStore PreferenceStore
public PreferenceStore()
From source file:org.eclipse.tcf.te.tcf.ui.console.internal.preferences.PreferencesPage.java
License:Open Source License
/** * Constructor.//from w w w. j av a2 s . co m */ public PreferencesPage() { super(GRID); // Use a preferences store which never needs saving preferenceStore = new PreferenceStore() { @Override public boolean needsSaving() { return false; } }; }
From source file:org.eclipse.tcf.te.tcf.ui.preferences.LoggingPreferencePage.java
License:Open Source License
/** * Constructor.//from w w w . ja va 2 s . c o m */ public LoggingPreferencePage() { super(FieldEditorPreferencePage.GRID); // The internal preference store never needs saving store = new PreferenceStore() { @Override public boolean needsSaving() { return false; } }; }
From source file:org.eclipse.titan.designer.preferences.pages.SyntaxHighlightPage.java
License:Open Source License
@Override public void init(final IWorkbench workbench) { setPreferenceStore(Activator.getDefault().getPreferenceStore()); tempstore = new PreferenceStore(); TempPreferenceInitializer inittializer = new TempPreferenceInitializer(); inittializer.initializeDefaultPreferences(); }
From source file:org.eclipse.titan.designer.properties.pages.FileBuildPropertyPage.java
License:Open Source License
public FileBuildPropertyPage() { super(); tempStore = new PreferenceStore(); }
From source file:org.eclipse.titan.designer.properties.pages.FolderBuildPropertyPage.java
License:Open Source License
public FolderBuildPropertyPage() { super(); tempStore = new PreferenceStore(); }
From source file:org.eclipse.titan.designer.properties.pages.ProjectBuildPropertyPage.java
License:Open Source License
public ProjectBuildPropertyPage() { super(); tempStorage = new PreferenceStore(); }
From source file:org.eclipse.ui.editors.tests.ChainedPreferenceStoreTest.java
License:Open Source License
/** * [implementation] ChainedPreferenceStore * https://bugs.eclipse.org/bugs/show_bug.cgi?id=69419 *//*w w w. j av a 2 s. com*/ public void testChainedStore0() { IPreferenceStore store1 = new PreferenceStore(); IPreferenceStore store2 = new PreferenceStore(); IPreferenceStore chainedStore = new ChainedPreferenceStore(new IPreferenceStore[] { store1, store2 }); store2.setDefault(PROPERTY, DEFAULT_VALUE); chainedStore.addPropertyChangeListener(fPropertyChangeListener); store1.firePropertyChangeEvent(PROPERTY, VALUE, DEFAULT_DEFAULT_VALUE); // simulated removal with newValue != null chainedStore.removePropertyChangeListener(fPropertyChangeListener); assertEquals(1, fEvents.size()); PropertyChangeEvent event = (PropertyChangeEvent) fEvents.get(0); assertEquals(chainedStore, event.getSource()); assertEquals(PROPERTY, event.getProperty()); assertEquals(VALUE, event.getOldValue()); assertEquals(DEFAULT_VALUE, event.getNewValue()); }
From source file:org.eclipse.ui.editors.tests.ChainedPreferenceStoreTest.java
License:Open Source License
/** * Assertion failed in ChainedPreferenceStore.handlePropertyChangeEvent(..) * https://bugs.eclipse.org/bugs/show_bug.cgi?id=52827 */// www. j a v a2 s.c om public void testChainedStore1() { IPreferenceStore store1 = new PreferenceStore(); IPreferenceStore store2 = new PreferenceStore(); IPreferenceStore chainedStore = new ChainedPreferenceStore(new IPreferenceStore[] { store1, store2 }); chainedStore.addPropertyChangeListener(fPropertyChangeListener); store1.firePropertyChangeEvent(PROPERTY, VALUE, DEFAULT_DEFAULT_VALUE); // simulated removal with newValue != null chainedStore.removePropertyChangeListener(fPropertyChangeListener); assertEquals(1, fEvents.size()); PropertyChangeEvent event = (PropertyChangeEvent) fEvents.get(0); assertEquals(store1, event.getSource()); assertEquals(PROPERTY, event.getProperty()); assertEquals(VALUE, event.getOldValue()); assertEquals(DEFAULT_DEFAULT_VALUE, event.getNewValue()); }
From source file:org.eclipse.ui.editors.tests.ChainedPreferenceStoreTest.java
License:Open Source License
/** * Third case where the initial implementation used to have an assertion which would fail in this case *//*from w ww . java 2s. c o m*/ public void testChainedStore2() { IPreferenceStore store1 = new PreferenceStore(); IPreferenceStore store2 = new PreferenceStore(); IPreferenceStore chainedStore = new ChainedPreferenceStore(new IPreferenceStore[] { store1, store2 }); store1.setValue(PROPERTY, VALUE); chainedStore.addPropertyChangeListener(fPropertyChangeListener); store1.firePropertyChangeEvent(PROPERTY, DEFAULT_VALUE, null); // simulated change with newValue == null chainedStore.removePropertyChangeListener(fPropertyChangeListener); assertEquals(1, fEvents.size()); PropertyChangeEvent event = (PropertyChangeEvent) fEvents.get(0); assertEquals(store1, event.getSource()); assertEquals(PROPERTY, event.getProperty()); assertEquals(DEFAULT_VALUE, event.getOldValue()); assertEquals(null, event.getNewValue()); }
From source file:org.eclipse.ui.editors.tests.ChainedPreferenceStoreTest.java
License:Open Source License
/** * Case where the initial implementation used to throw an IAE */// w w w . ja v a 2 s .c o m public void testChainedStore3() { IPreferenceStore store1 = new PreferenceStore(); IPreferenceStore store2 = new PreferenceStore(); IPreferenceStore chainedStore = new ChainedPreferenceStore(new IPreferenceStore[] { store1, store2 }); store2.setDefault(PROPERTY, DEFAULT_VALUE); chainedStore.addPropertyChangeListener(fPropertyChangeListener); store1.firePropertyChangeEvent(PROPERTY, null, null); // simulated removal with oldValue == null chainedStore.removePropertyChangeListener(fPropertyChangeListener); assertEquals(1, fEvents.size()); PropertyChangeEvent event = (PropertyChangeEvent) fEvents.get(0); assertEquals(chainedStore, event.getSource()); assertEquals(PROPERTY, event.getProperty()); assertEquals(null, event.getOldValue()); assertEquals(DEFAULT_VALUE, event.getNewValue()); }