Package org.rssowl.core.internal.persist.pref

Examples of org.rssowl.core.internal.persist.pref.GlobalScope


    eclipsePreferences.putInteger(Preference.ECLIPSE_AUTOCLOSE_TABS_THRESHOLD.id(), 5);
    eclipsePreferences.putString(Preference.ECLIPSE_PROXY_HOST_HTTP.id(), "");
  }

  private void assertPreferences() {
    IPreferenceScope globalPreferences = new GlobalScope(Owl.getPreferenceService().getDefaultScope());
    IPreferenceScope eclipsePreferences = Owl.getPreferenceService().getGlobalScope();

    assertEquals(true, globalPreferences.getBoolean(Preference.MARK_READ_ON_TAB_CLOSE.id()));
    assertEquals(5, globalPreferences.getInteger(Preference.MARK_READ_IN_MILLIS.id()));
    assertTrue(Arrays.equals(new int[] { -1, 0, 1, 2, 3 }, globalPreferences.getIntegers(Preference.BM_NEWS_COLUMNS.id())));
    assertEquals(8, globalPreferences.getLong(Preference.BM_UPDATE_INTERVAL.id()));
    assertTrue(globalPreferences.getLong(Preference.NM_SELECTED_NEWS.id()) != 100);
    assertEquals("hello world", globalPreferences.getString(Preference.CUSTOM_BROWSER_PATH.id()));
    assertTrue(Arrays.equals(new String[] { "hello", "world", "foo", "bar" }, globalPreferences.getStrings(Preference.DISABLE_JAVASCRIPT_EXCEPTIONS.id())));

    assertEquals(true, eclipsePreferences.getBoolean(Preference.ECLIPSE_SINGLE_CLICK_OPEN.id()));
    assertEquals(5, eclipsePreferences.getInteger(Preference.ECLIPSE_AUTOCLOSE_TABS_THRESHOLD.id()));
    assertEquals("", eclipsePreferences.getString(Preference.ECLIPSE_PROXY_HOST_HTTP.id()));
  }
View Full Code Here


  private final IPreferenceScope fGlobalScope;

  /** */
  public PreferenceServiceImpl() {
    fDefaultScope = new DefaultScope();
    fGlobalScope = new GlobalScope(fDefaultScope);
    initScopedPreferences();
  }
View Full Code Here

  private final IPreferenceScope fEclipseScope;

  /** */
  public PreferenceServiceImpl() {
    fDefaultScope = new DefaultScope();
    fGlobalScope = new GlobalScope(fDefaultScope);
    fEclipseScope = new EclipseScope(fDefaultScope);
    initScopedPreferences();
  }
View Full Code Here

  private final IPreferenceScope fEclipseScope;

  /** */
  public PreferenceServiceImpl() {
    fDefaultScope = new DefaultScope();
    fGlobalScope = new GlobalScope(fDefaultScope);
    fEclipseScope = new EclipseScope(fDefaultScope);
    initScopedPreferences();
  }
View Full Code Here

    eclipsePreferences.putInteger(Preference.ECLIPSE_AUTOCLOSE_TABS_THRESHOLD.id(), 5);
    eclipsePreferences.putString(Preference.ECLIPSE_PROXY_HOST_HTTP.id(), "");
  }

  private void assertPreferences() {
    IPreferenceScope globalPreferences = new GlobalScope(Owl.getPreferenceService().getDefaultScope());
    IPreferenceScope eclipsePreferences = Owl.getPreferenceService().getGlobalScope();

    assertEquals(true, globalPreferences.getBoolean(Preference.MARK_READ_ON_TAB_CLOSE.id()));
    assertEquals(5, globalPreferences.getInteger(Preference.MARK_READ_IN_MILLIS.id()));
    assertTrue(Arrays.equals(new int[] { -1, 0, 1, 2, 3 }, globalPreferences.getIntegers(Preference.BM_NEWS_COLUMNS.id())));
    assertEquals(8, globalPreferences.getLong(Preference.BM_UPDATE_INTERVAL.id()));
    assertTrue(globalPreferences.getLong(Preference.NM_SELECTED_NEWS.id()) != 100);
    assertEquals("hello world", globalPreferences.getString(Preference.CUSTOM_BROWSER_PATH.id()));
    assertTrue(Arrays.equals(new String[] { "hello", "world", "foo", "bar" }, globalPreferences.getStrings(Preference.DISABLE_JAVASCRIPT_EXCEPTIONS.id())));

    assertEquals(true, eclipsePreferences.getBoolean(Preference.ECLIPSE_SINGLE_CLICK_OPEN.id()));
    assertEquals(5, eclipsePreferences.getInteger(Preference.ECLIPSE_AUTOCLOSE_TABS_THRESHOLD.id()));
    assertEquals("", eclipsePreferences.getString(Preference.ECLIPSE_PROXY_HOST_HTTP.id()));
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.internal.persist.pref.GlobalScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.