Examples of IScopeContext


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

            Log.error(e);
        }
    }   

    private IEclipsePreferences getProjectPreferences(String nodeId) {
        IScopeContext context = new ProjectScope(getProject());
        IEclipsePreferences node = context.getNode(nodeId);
        return node;
    }
View Full Code Here

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

    if (!JavaProject.hasJavaNature(this.project)) return null;
    // Get cached preferences if exist
    JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(this.project, true);
    if (perProjectInfo.preferences != null) return perProjectInfo.preferences;
    // Init project preferences
    IScopeContext context = new ProjectScope(getProject());
    final IEclipsePreferences eclipsePreferences = context.getNode(JavaCore.PLUGIN_ID);
    updatePreferences(eclipsePreferences);
    perProjectInfo.preferences = eclipsePreferences;

    // Listen to new preferences node
    final IEclipsePreferences eclipseParentPreferences = (IEclipsePreferences) eclipsePreferences.parent();
View Full Code Here

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

public class Preferences {
  IEclipsePreferences pref;

  public Preferences(IProject project) {
    IScopeContext projectScope = new ProjectScope(project);
    pref = projectScope.getNode(Activator.PLUGIN_ID);
  }
View Full Code Here

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

    if (!JavaProject.hasJavaNature(this.project)) return null;
    // Get cached preferences if exist
    JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(this.project, true);
    if (perProjectInfo.preferences != null) return perProjectInfo.preferences;
    // Init project preferences
    IScopeContext context = new ProjectScope(getProject());
    final IEclipsePreferences eclipsePreferences = context.getNode(JavaCore.PLUGIN_ID);
    updatePreferences(eclipsePreferences);
    perProjectInfo.preferences = eclipsePreferences;

    // Listen to new preferences node
    final IEclipsePreferences eclipseParentPreferences = (IEclipsePreferences) eclipsePreferences.parent();
View Full Code Here

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

        /*
         * 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

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

    }
    return root;
  }

  public static IEclipsePreferences getDefaultScope() {
    IScopeContext instance = null;
    try {
      instance = DefaultScope.INSTANCE;
    } catch (Throwable e) {
      // ignore could be backwards compatibility issue
    }
    return instance.getNode(FUSE_ROOT_KEY);
  }
View Full Code Here

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

    }
    return instance.getNode(FUSE_ROOT_KEY);
  }

  public static IEclipsePreferences getInstanceScope() {
    IScopeContext instance = null;
    try {
      instance = InstanceScope.INSTANCE;
    } catch (Throwable e) {
      // ignore could be backwards compatibility issue
    }
    return instance.getNode(FUSE_ROOT_KEY);
  }
View Full Code Here

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

    if (!JavaProject.hasJavaNature(this.project)) return null;
    // Get cached preferences if exist
    JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(this.project, true);
    if (perProjectInfo.preferences != null) return perProjectInfo.preferences;
    // Init project preferences
    IScopeContext context = new ProjectScope(getProject());
    final IEclipsePreferences eclipsePreferences = context.getNode(JavaCore.PLUGIN_ID);
    updatePreferences(eclipsePreferences);
    perProjectInfo.preferences = eclipsePreferences;

    // Listen to new preferences node
    final IEclipsePreferences eclipseParentPreferences = (IEclipsePreferences) eclipsePreferences.parent();
View Full Code Here

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

  public static IScopeContext getProjectScope(IProject project) {
    return new ProjectScope(project);
  }

  public static boolean getElementSettingsForProject(IProject project) {
    IScopeContext pScope = getProjectScope(project);
    return pScope.getNode(getPreferenceNodeQualifier()).getBoolean(
        getProjectSettingsKey(), false);
  }
View Full Code Here

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

  public static boolean getStopAtFirstLine(IProject project) {
    Preferences prefs = getModelPreferences();
    boolean stop = prefs
        .getBoolean(PHPDebugCorePreferenceNames.STOP_AT_FIRST_LINE);
    if (project != null && getElementSettingsForProject(project)) {
      IScopeContext projectScope = getProjectScope(project);
      stop = projectScope.getNode(getPreferenceNodeQualifier())
          .getBoolean(PHPDebugCorePreferenceNames.STOP_AT_FIRST_LINE,
              stop);
    }
    return stop;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.