Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ProjectScope


    } else {
      fManager = container.getWorkingCopyManager();
    }

    if (fProject != null) {
      fLookupOrder = new IScopeContext[] { new ProjectScope(fProject),
          InstanceScope.INSTANCE, DefaultScope.INSTANCE };
    } else {
      fLookupOrder = new IScopeContext[] { InstanceScope.INSTANCE,
          DefaultScope.INSTANCE };
    }
View Full Code Here


    }
  }

  public final boolean hasProjectSpecificOptions(IProject project) {
    if (project != null) {
      IScopeContext projectContext = new ProjectScope(project);
      Key[] allKeys = fAllKeys;
      for (int i = 0; i < allKeys.length; i++) {
        if (allKeys[i].getStoredValue(projectContext, fManager) != null) {
          return true;
        }
View Full Code Here

    fInstanceStore = PHPUiPlugin.getDefault().getCodeTemplateStore();
    if (project == null) {
      fProjectStore = null;
    } else {
      final ScopedPreferenceStore projectSettings = new ScopedPreferenceStore(
          new ProjectScope(project), PHPUiPlugin.ID);
      fProjectStore = new TemplateStore(projectSettings, KEY) {
        /*
         * Make sure we keep the id of added code templates - add
         * removes it in the usual add() method
         */
 
View Full Code Here

  public static boolean hasProjectSpecificTempates(IProject project) {
    if (project == null) {
      return false;
    }
    String pref = new ProjectScope(project).getNode(PHPUiPlugin.ID).get(
        KEY, null);
    if (pref != null && pref.trim().length() > 0) {
      Reader input = new StringReader(pref);
      TemplateReaderWriter reader = new TemplateReaderWriter();
      TemplatePersistenceData[] datas;
View Full Code Here

  private CodeFormatterPreferences getPreferences(IProject project)
      throws Exception {

    IEclipsePreferences node = null;
    if (project != null) {
      ProjectScope scope = (ProjectScope) new ProjectScope(project);
      node = scope.getNode(FormatterCorePlugin.PLUGIN_ID);
    }
    if (node == null
        || node.get(PreferenceConstants.FORMATTER_PROFILE, null) == null) {
      IScopeContext context = InstanceScope.INSTANCE;
      node = context.getNode(FormatterCorePlugin.PLUGIN_ID);
View Full Code Here

  public static IEclipsePreferences getPreferences(IProject project) {
    if (project == null) {
      return null;
    }
    ProjectScope projectScope = new ProjectScope(project);
    IEclipsePreferences node = projectScope
        .getNode(Constants.PLUGIN_PREFIX);
    return node;
  }
View Full Code Here

  public IScopeContext getInstanceScope() {
    return InstanceScope.INSTANCE;
  }

  public IScopeContext getProjectScope(IProject project) {
    return new ProjectScope(project);
  }
View Full Code Here

    // remove the node listeners
    Iterator projects = projectToNodeListener.keySet().iterator();
    try {
      while (projects.hasNext()) {
        Object project = projects.next();
        ProjectScope scope = (ProjectScope) projectToScope.get(project);
        IEclipsePreferences node = scope.getNode(nodeQualifier);
        if (node != null) {
          node
              .removeNodeChangeListener((INodeChangeListener) projectToNodeListener
                  .get(project));
        }
View Full Code Here

  /*
   * Returns true if the given project has a specific settings for the given
   * key; false, otherwise.
   */
  private boolean isProjectSpecific(IProject project, String preferencesKey) {
    ProjectScope projectScope = getProjectScope(project);
    IPath location = projectScope.getLocation();
    if (location != null && new File(location.toOSString()).exists()) {
      return projectScope.getNode(nodeQualifier)
          .get(preferencesKey, null) != null;
    }
    return false;
  }
View Full Code Here

  /*
   * Returns a ProjectScope for the given IProject.
   */
  private ProjectScope getProjectScope(IProject project) {
    ProjectScope scope = (ProjectScope) projectToScope.get(project);
    if (scope == null) {
      scope = new ProjectScope(project);
      projectToScope.put(project, scope);
    }
    return scope;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.ProjectScope

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.