Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ProjectScope


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

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

        final String actual = project.getProperties().getIncludeDirs().toString();
View Full Code Here


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

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

        final String actual = project.getProperties().getSourceDirs().toString();
View Full Code Here

    private final IScopeContext[] nextContexts;

    public static PreferencesHelper getHelper(final String qualifier,
            final IProject project) {
        return new PreferencesHelper(qualifier, new IScopeContext[] {
                new ProjectScope(project), InstanceScope.INSTANCE,
                ConfigurationScope.INSTANCE, DefaultScope.INSTANCE }, new ProjectScope(
                project));
    }
View Full Code Here

        IEclipsePreferences pref;
        synchronized (projectPrefs) {
            pref = (IEclipsePreferences) projectPrefs.get(project);
        }
        if (pref == null) {
            IScopeContext projectScope = new ProjectScope(project);
            pref = projectScope.getNode(IvyPlugin.ID);
        }
        String retrieveSetup = pref.get(PREF_ID, null);
        if (retrieveSetup == null) {
            return new ArrayList();
        }
View Full Code Here

        final String retrieveSetup = new String(out.toByteArray());

        synchronized (projectPrefs) {
            IEclipsePreferences pref = (IEclipsePreferences) projectPrefs.get(project);
            if (pref == null) {
                IScopeContext projectScope = new ProjectScope(project);
                pref = projectScope.getNode(IvyPlugin.ID);
                projectPrefs.put(project, pref);
            }
            pref.put(PREF_ID, retrieveSetup);
        }
    }
View Full Code Here

        return true;
    }

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

            Log.error(e);
        }
    }   

    private IEclipsePreferences getProjectPreferences(String nodeId) {
        IScopeContext context = new ProjectScope(getProject());
        IEclipsePreferences node = context.getNode(nodeId);
        return node;
    }
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 new preferences node
    final IEclipsePreferences eclipseParentPreferences = (IEclipsePreferences) eclipsePreferences.parent();
View Full Code Here

    }

    private void initPreferencesStore(IProject currProject) {
        workspaceStore = new ScopedPreferenceStore(new InstanceScope(), FindbugsPlugin.PLUGIN_ID);
        if (currProject != null) {
            projectStore = new ScopedPreferenceStore(new ProjectScope(currProject), FindbugsPlugin.PLUGIN_ID);
            projectPropsInitiallyEnabled = FindbugsPlugin.isProjectSettingsEnabled(currProject);
            if (!projectPropsInitiallyEnabled) {
                // use workspace properties instead
                currProject = null;
            }
View Full Code Here

   */
  private String getLineDelimiterPreference(IFile file) {
    IScopeContext[] scopeContext;
    if (file != null && file.getProject() != null) {
      // project preference
      scopeContext= new IScopeContext[] { new ProjectScope(file.getProject()) };
      String lineDelimiter= Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext);
      if (lineDelimiter != null)
        return lineDelimiter;
    }
    // workspace preference
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.