Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ProjectScope


        // 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 :
                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 :
                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");
                return false;
View Full Code Here


  }
 
  public void reload() throws BackingStoreException {
    if (!this.prefsChanging) {
      this.folders.clear();
      final ProjectScope scope = new ProjectScope(project);
      final IEclipsePreferences prefs = scope.getNode(PREFS_QUALIFIER);
     
      if (prefs.nodeExists(PREFS_DEFAULT_WEB_ROOT)) {
        final String def = prefs.get(PREFS_DEFAULT_WEB_ROOT, null);
        if (def.length() == 0) {
          this.defaultWebFolder = this.project;
View Full Code Here

    if (!folder.getProject().equals(this.project)) {
      throw new CoreException(new Status(IStatus.ERROR, PEXServerPlugin.PLUGIN_ID, "Container not within target project")); //$NON-NLS-1$
    }
    this.prefsChanging = true;
    try {
      final ProjectScope scope = new ProjectScope(project);
      final IEclipsePreferences prefs = scope.getNode(PREFS_QUALIFIER);
      prefs.put(PREFS_DEFAULT_WEB_ROOT, folder.getProjectRelativePath().toString());
      try {
        prefs.flush();
      } catch (BackingStoreException e) {
        throw new CoreException(new Status(IStatus.ERROR, PEXServerPlugin.PLUGIN_ID, "Error while saving preferences", e)); //$NON-NLS-1$
View Full Code Here

  }

  private void saveFolders() throws CoreException {
    this.prefsChanging = true;
    try {
      final ProjectScope scope = new ProjectScope(project);
      final IEclipsePreferences prefs = scope.getNode(PREFS_QUALIFIER);
      prefs.put(PREFS_FOLDER_COUNT, String.valueOf(folders.size()));
      for (int i = 0; i < folders.size(); i++) {
        final WebFolder folder = this.folders.get(i);
        prefs.put(PREFS_FOLDER_CONTAINER + i, folder.getFolder().getProjectRelativePath().toString());
        prefs.put(PREFS_FOLDER_PATHNAME + i, folder.getPathName());
View Full Code Here

  public IScopeContext getInstanceScope() {
    return new InstanceScope();
  }

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

  private void setupOptions() {

    options = new HashMap(PHPCorePlugin.getOptions());
   
    IScopeContext[] contents = new IScopeContext[] {
        new ProjectScope(type
            .getScriptProject()
            .getProject()),
            InstanceScope.INSTANCE, DefaultScope.INSTANCE };
   
    for (int i = 0; i < contents.length; i++) {
View Full Code Here

        super();
    }

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

            final IErlProject project) {
        IProjectConfigurator result = null;
        switch (configType) {
        case INTERNAL:
            final String configName = configType.getConfigName();
            final IEclipsePreferences node = new ProjectScope(
                    project.getWorkspaceProject()).getNode(configName);
            // TODO remove later
            // (shade legacy projects, how long to support them?)
            final IEclipsePreferences oldNode = new ProjectScope(
                    project.getWorkspaceProject()).getNode("org.erlide.core");
            result = new PreferencesProjectConfigurator(node, oldNode);
            break;
        case REBAR:
        case EMAKE:
View Full Code Here

        }
        return properties;
    }

    public IEclipsePreferences getCorePropertiesNode() {
        return new ProjectScope(fProject).getNode("org.erlide.model");
    }
View Full Code Here

    @Test
    public void outputPathShouldFollowPropertyChange() throws BackingStoreException {
        final String expected = "hello/world";

        final IProject wproject = project.getWorkspaceProject();
        final IEclipsePreferences node = new ProjectScope(wproject)
                .getNode("org.erlide.model");
        node.put(ProjectPreferencesConstants.OUTPUT_DIR, expected);
        node.flush();

        final ErlangProjectProperties pp = project.getProperties();
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.