Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ProjectScope


  private void init() {
    fPreferenceService = Platform.getPreferencesService();
    fLookupOrder = new IScopeContext[] {new InstanceScope(), new DefaultScope()};
   
    if (fProject != null) {
      ProjectScope projectScope = new ProjectScope(fProject);
      if(projectScope.getNode(HTMLCorePlugin.getDefault().getBundle().getSymbolicName()).getBoolean(HTMLCorePreferenceNames.USE_PROJECT_SETTINGS, false))
        fLookupOrder = new IScopeContext[] {projectScope, new InstanceScope(), new DefaultScope()};
    }
   
    for (int i = 0; i < NodeType.MAX_TYPE; i++) {
      errTables[i] = new ErrorTable();
View Full Code Here


        IPath path = new Path(baseLocation);
        if (path.segmentCount() > 1) {
          IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
          if (project.isAccessible()) {
            String key = createPreferenceKey(path);
            IEclipsePreferences preferences = new ProjectScope(project).getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
            type = preferences.get(key, DEFAULT_MIMETYPE);
          }
        }
      }
    }
View Full Code Here

  private void loadPreferences(IFile file) {
    fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};

    fPreferencesService = Platform.getPreferencesService();
    if (file != null && file.isAccessible()) {
      ProjectScope projectScope = new ProjectScope(file.getProject());
      if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
        fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
      }
    }
  }
View Full Code Here

   *         false
   */
  static Preferences getPreferences(IProject project, String preferenceKey, boolean create) {
    if (create)
      // create all nodes down to the one we are interested in
      return new ProjectScope(project).getNode(JSPCORE_ID).node(preferenceKey);
    // be careful looking up for our node so not to create any nodes as
    // side effect
    Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
    try {
      // TODO once bug 90500 is fixed, should be as simple as this:
View Full Code Here

  private void loadPreferences(IFile file) {
    fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};

    fPreferencesService = Platform.getPreferencesService();
    if (file != null && file.isAccessible()) {
      ProjectScope projectScope = new ProjectScope(file.getProject());
      if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
        fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
      }
    }

    fSeverityIncludeFileMissing = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND);
View Full Code Here

   */
  private void setProject(IProject project) {
    boolean useProject = false;
    if (project != null) {
      fProject = JavaCore.create(project);
      fPreferences = new ProjectScope(fProject.getProject()).getNode(PREFERENCE_NODE_QUALIFIER);
      useProject = fPreferences.getBoolean(HTMLCorePreferenceNames.USE_PROJECT_SETTINGS, false);
    }
    else {
      fProject = null;
    }
View Full Code Here

  private void init() {
    fPreferenceService = Platform.getPreferencesService();
    fLookupOrder = new IScopeContext[] {new InstanceScope(), new DefaultScope()};
   
    if (fProject != null) {
      ProjectScope projectScope = new ProjectScope(fProject);
      if(projectScope.getNode(HTMLCorePlugin.getDefault().getBundle().getSymbolicName()).getBoolean(HTMLCorePreferenceNames.USE_PROJECT_SETTINGS, false))
        fLookupOrder = new IScopeContext[] {projectScope, new InstanceScope(), new DefaultScope()};
    }
   
    for (int i = 0; i < NodeType.MAX_TYPE; i++) {
      errTables[i] = new ErrorTable();
View Full Code Here

      else {
        try {
          final IJavaProject javaProject = JavaCore.create(file.getProject());
          if (javaProject.exists()) {
            IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
            ProjectScope projectScope = new ProjectScope(file.getProject());
            if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
              scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
            }
            Map[] problems = detectProblems(javaProject, file, scopes);
            for (int i = 0; i < problems.length; i++) {
              ValidatorMessage message = ValidatorMessage.create(problems[i].get(IMarker.MESSAGE).toString(), resource);
View Full Code Here

    }
    else {
      project = resource.getProject();
    }
    if (project != null) {
      IEclipsePreferences node = new ProjectScope(project).getNode(qualifier);
      // first, check whether project specific settings are to be used
      boolean useProjectSettings = node.getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false);
      if (useProjectSettings) {
        // only if so, return that value
        return node.getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
View Full Code Here

   *         false
   */
  static Preferences getPreferences(IProject project, String preferenceKey, boolean create) {
    if (create)
      // create all nodes down to the one we are interested in
      return new ProjectScope(project).getNode(HTMLCORE_ID).node(preferenceKey);
    // be careful looking up for our node so not to create any nodes as
    // side effect
    Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
    try {
      // TODO once bug 90500 is fixed, should be as simple as this:
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.