Package org.eclipse.core.runtime.preferences

Examples of org.eclipse.core.runtime.preferences.InstanceScope


      if (lineSeparator != null)
        return lineSeparator;
    }

    // line delimiter in workspace preference
    scopeContext = new IScopeContext[] { new InstanceScope() };
    lineSeparator = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR,
        null, scopeContext);
    if (lineSeparator != null)
      return lineSeparator;
View Full Code Here


  /**
   * Checks if the default double click action is active
   * @since 2.0.2
   */
  public static boolean shouldOpenConfigFile() {
    IScopeContext context = new InstanceScope();
    IEclipsePreferences node = context.getNode(BeansUIPlugin.PLUGIN_ID);
    return node.getBoolean(
        BeansUIPlugin.DEFAULT_DOUBLE_CLICK_ACTION_PREFERENCE_ID, true);
  }
View Full Code Here

  /**
   * Returns the port of the console defined in the preferences
   * @return port
   */
  private int getPort() {
    IScopeContext context = new InstanceScope();
    IEclipsePreferences preferences = context.getNode(OsgiPlugin.PLUGIN_ID);
    return Integer.valueOf(preferences.get(OsgiPlugin.PORT_PREFERENCE_KEY,
        OsgiPlugin.DEFAULT_PORT));
  }
View Full Code Here

* @author Steffen Pingel
*/
public class AllJDTQuickfixTests {

  public static Test suite() {
    IPreferenceStore store = new ScopedPreferenceStore(new InstanceScope(), "org.eclipse.ajdt.ui");
    store.setValue("promptForAutoOpenCrossReference", false);

    TestSuite suite = new TestSuite(AllJDTQuickfixTests.class.getName());
    // $JUnit-BEGIN$

View Full Code Here

      return color;
    }
  }

  private static Color getColorFromPreferences(Class element) {
    IScopeContext context = new InstanceScope();
    IEclipsePreferences node = context.getNode(Activator.PLUGIN_ID);

    String value = node.get(getPreferenceName(element.getName()),
        getDefaultColorStringForModelElementClass(element));
    RGB rgb = StringConverter.asRGB(value);
View Full Code Here

    classToColorMapCache.put(element.getClass(), color);
  }

  private static void setColorToPreferences(Class element, RGB rgb) {
    try {
      IScopeContext context = new InstanceScope();
      IEclipsePreferences node = context.getNode(Activator.PLUGIN_ID);

      node.put(getPreferenceName(element.getName()), StringConverter
          .asString(rgb));
      node.flush();
    }
View Full Code Here

*/
public class ConsolePortVariableResolver implements IDynamicVariableResolver {

  public String resolveValue(IDynamicVariable variable, String argument)
      throws CoreException {
    IScopeContext context = new InstanceScope();
    IEclipsePreferences preferences = context.getNode(OsgiPlugin.PLUGIN_ID);
    return preferences.get(OsgiPlugin.PORT_PREFERENCE_KEY,
        OsgiPlugin.DEFAULT_PORT);
  }
View Full Code Here

      }
    }
  }

  private boolean shouldModelByPersisted() {
    IScopeContext context = new InstanceScope();
    IEclipsePreferences node = context.getNode(Activator.PLUGIN_ID);
    return node.getBoolean(Activator.PERSIST_AOP_MODEL_PREFERENCE, true);
  }
View Full Code Here

     * @return the preference store
     */
    public IPreferenceStore getPreferenceStore() {
        // Create the preference store lazily.
        if (preferenceStore == null) {
            preferenceStore = new ScopedPreferenceStore(new InstanceScope(),getBundle().getSymbolicName());

        }
        return preferenceStore;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.preferences.InstanceScope

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.