Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ProjectScope


   *
   * @return
   * @throws CoreException
   */
  public String getDevelopmentLanguage() throws CoreException {
    IScopeContext projectScope = new ProjectScope(getDesignRoot().getProject());
    IEclipsePreferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
    String langCode = projectNode.get("WGA_DESIGN_DEV_LANGUAGE/" + getDesignRoot().getLocation(), null);
    if (langCode != null && getAvailableLableLanguages().contains(langCode.toLowerCase())) {
      return langCode.toLowerCase();
    } else {
      List<String> languages = getAvailableLableLanguages();
View Full Code Here


      }
    }
  }

  public boolean isSortLabelFiles() {
    IScopeContext projectScope = new ProjectScope(getDesignRoot().getProject());
    IEclipsePreferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
    return projectNode.getBoolean("WGA_DESIGN_SORT_LABEL_FILES/" + getDesignRoot().getLocation(), false);
  }
View Full Code Here

    IEclipsePreferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
    return projectNode.getBoolean("WGA_DESIGN_SORT_LABEL_FILES/" + getDesignRoot().getLocation(), false);
  }

  public void setSortLabelFiles(boolean sort) throws BackingStoreException {
    IScopeContext projectScope = new ProjectScope(getDesignRoot().getProject());
    IEclipsePreferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
    projectNode.putBoolean("WGA_DESIGN_SORT_LABEL_FILES/" + getDesignRoot().getLocation(), sort);
    projectNode.flush();
  }
View Full Code Here

   */
  public void setDevelopmentLanguage(String langCode) throws CoreException, BackingStoreException {
    if (langCode != null) {
      langCode = langCode.toLowerCase();
    }
    IScopeContext projectScope = new ProjectScope(getDesignRoot().getProject());
    IEclipsePreferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
    projectNode.put("WGA_DESIGN_DEV_LANGUAGE/" + getDesignRoot().getLocation(), langCode);
    projectNode.flush();
  }
View Full Code Here

        }
        return _headerFileMap;
    }
   
    public IEclipsePreferences getProjectPreferences(IProject project){       
        IScopeContext projectScope = new ProjectScope(project);       
        return (IEclipsePreferences) projectScope.getNode(PLUGIN_ID);
    }
View Full Code Here

        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 node removal from parent in order to reset cache (see bug 68993)
        IEclipsePreferences.INodeChangeListener nodeListener = new IEclipsePreferences.INodeChangeListener() {
View Full Code Here

        return true;
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {
        return new ScopedPreferenceStore(new ProjectScope(getProject()), Plugin.PLUGIN_ID);
    }
View Full Code Here

    @Override
    protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
        BndPreferences prefs = new BndPreferences();
        logLevel = prefs.getBuildLogging();
        projectPrefs = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);

        // Prepare validations
        classpathErrors = new LinkedList<String>();
        validationResults = new MultiStatus(PLUGIN_ID, 0, "Validation errors in bnd project", null);
        buildLog = new ArrayList<String>(5);
View Full Code Here

        // Check if compilation errors exist, and if so check the project
        // settings for what to do about that...
        Action buildAction = Action.build;
        if (hasBlockingErrors()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
            default :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until compilation problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to Java problem markers");
                return false;
            case build :
                buildAction = Action.build;
                break;
            case delete :
                buildAction = Action.delete;
                break;
            }
        } else if (!classpathErrors.isEmpty()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
            default :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until classpath resolution problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to classpath resolution problem markers");
View Full Code Here

    @Override
    protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
        BndPreferences prefs = new BndPreferences();
        logLevel = prefs.getBuildLogging();
        projectPrefs = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);

        // Prepare validations
        classpathErrors = new LinkedList<String>();
        validationResults = new MultiStatus(PLUGIN_ID, 0, "Validation errors in bnd project", null);
        buildLog = new ArrayList<String>(5);
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.