Package org.eclipse.core.runtime.preferences

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


         * Replace "new InstanceScope()" with "InstanceScope.INSTANCE" once Sapphire no longer needs to
         * support Eclipse 3.6.x releases.
         */
       
        @SuppressWarnings( "deprecation" )
        final IScopeContext scope = new InstanceScope();
       
        final Preferences prefs = scope.getNode( this.pluginId );
        final String editorId = getClass().getName();
       
        if( prefs.nodeExists( editorId ) || createIfNecessary )
        {
            return prefs.node( editorId );
View Full Code Here


  }

  @SuppressWarnings( "deprecation" )
  public static Preferences getWorkspacePreferences() {
    // InstanceScope.INSTANCE does not yet exist in Eclipse 3.6
    return new InstanceScope().getNode( Activator.PLUGIN_ID );
  }
View Full Code Here

  IEclipsePreferences preferenceStore;

  public ConfiguratorEnabler(String enablerId, String label, String[] configuratorIds, String description) {
    //Keep new DefaultScope() to maintain Helios compatibility
    preferenceStore = new InstanceScope().getNode(MavenWtpPlugin.ID);
    this.id = enablerId;
    this.label = label;
    this.description = description;
    if(configuratorIds != null) {
      for(String id : configuratorIds) {
View Full Code Here

  @Override
  public IPreferenceStore getPreferenceStore() {
    // Create the preference store lazily.
    if(preferenceStore == null) {
      // InstanceScope.INSTANCE added in 3.7
      preferenceStore = new ScopedPreferenceStore(new InstanceScope(), OverlayConstants.PLUGIN_ID);

    }
    return preferenceStore;
  }
View Full Code Here

    // Note: uses the pre Eclipse 3.6 way of specifying search scopes (deprecated since 3.6)
    boolean isUseProjectSettings = useProjectSettingsButton.getSelection();
    link.setEnabled(!isUseProjectSettings);
    if(!isUseProjectSettings) {
      setSearchContexts(
        getPreferenceStore(), new IScopeContext[] { new InstanceScope(), new ConfigurationScope() });
    }
    else {
      // copy instance values to project specific values
      setSearchContexts(getPreferenceStore(), new IScopeContext[] {
          new ProjectScope(currentProject()), new InstanceScope(), new ConfigurationScope() });
      setProjectSpecificValues();
    }
    updateFieldEditors(isUseProjectSettings);
  }
View Full Code Here

  private Preferences preferences;

  public ResourcesSynchronizationPreferencePage() {
    setDescription("Modify the behaviour that the workspace should take in response to resource changes for shared projects. Please note that distributed changes may be slow to appear on remote clients due to latency issues. Clients are also free to ignore remote changes outright.");

    preferences = new InstanceScope().getNode(SyncResourcesCore.PLUGIN_ID);

    originals[0] = SyncResourcesCore.getInt(PreferenceConstants.LOCAL_RESOURCE_ADDITION);
    originals[1] = SyncResourcesCore.getInt(PreferenceConstants.LOCAL_RESOURCE_CHANGE);
    originals[2] = SyncResourcesCore.getInt(PreferenceConstants.LOCAL_RESOURCE_DELETION);
    originals[3] = SyncResourcesCore.getInt(PreferenceConstants.REMOTE_RESOURCE_ADDITION);
View Full Code Here

   * )
   */
  public void start(BundleContext ctxt) throws Exception {
    super.start(ctxt);
    attachListener();
    preferences = new InstanceScope().getNode(SyncResourcesCore.PLUGIN_ID);
    defaultPreferences = new DefaultScope()
        .getNode(SyncResourcesCore.PLUGIN_ID);
  }
View Full Code Here

    return uri.replace('/', '.');
  }

  public void removeConnectionDetails(ConnectionDetails cd) {
    try {
      Preferences preferences = new InstanceScope()
          .getNode(ClientPlugin.PLUGIN_ID);
      Preferences connections = preferences.node(SAVED);
      String[] targets = connections.childrenNames();
      for (int i = 0; i < targets.length; i++) {
        String target = targets[i];
View Full Code Here

  public Collection getConnectionDetails() {
    return connectionDetails.values();
  }

  public void saveConnectionDetailsToPreferenceStore() {
    Preferences preferences = new InstanceScope()
        .getNode(ClientPlugin.PLUGIN_ID);
    Preferences connections = preferences.node(SAVED);
    for (Iterator i = connectionDetails.keySet().iterator(); i.hasNext();) {
      String target = (String) i.next();
      ConnectionDetails details = (ConnectionDetails) connectionDetails
View Full Code Here

    }
  }

  public void loadConnectionDetailsFromPreferenceStore() {
    try {
      Preferences preferences = new InstanceScope()
          .getNode(ClientPlugin.PLUGIN_ID);
      Preferences connections = preferences.node(SAVED);
      String[] targets = connections.childrenNames();
      for (int i = 0; i < targets.length; i++) {
        String target = targets[i];
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.