Java Code Examples for org.eclipse.core.runtime.preferences.IScopeContext.getNode()

The following are Jave code examples for showing how to use getNode() of the org.eclipse.core.runtime.preferences.IScopeContext class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: eclipse-asciidoctools   File: AsciidocConfiguration.java   Source Code and License Vote up 6 votes
private static boolean updateConfigurationFromSettings(AsciidocConfiguration configuration, IProject project) {
	final IScopeContext projectScope = new ProjectScope(project);
	IEclipsePreferences preferences = projectScope.getNode(Activator.PLUGIN_ID);
	try {
		createSettings(project, BACKEND_DEFAULT, RESOURCESPATH_DEFAULT, SOURCESPATH_DEFAULT, STYLESHEETPATH_DEFAULT, TARGETPATH_DEFAULT);
		configuration.setBackend(preferences.get(BACKEND_PROPERTY, BACKEND_DEFAULT));
		configuration.setResourcesPath(preferences.get(RESOURCESPATH_PROPERTY, RESOURCESPATH_DEFAULT));
		configuration.setSourcesPath(preferences.get(SOURCESPATH_PROPERTY, SOURCESPATH_DEFAULT));
		configuration.setStylesheetPath(preferences.get(STYLESHEETPATH_PROPERTY, STYLESHEETPATH_DEFAULT));
		configuration.setTargetPath(preferences.get(TARGETPATH_PROPERTY, TARGETPATH_DEFAULT));
	} catch (BackingStoreException e) {
		Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, e.getMessage(), e));
		return false;
	}
	configuration.source = AsciidocConfigurationSource.SETTINGS;
	return true;
}
 
Example 2
Project: eclipse   File: BazelProjectSupport.java   Source Code and License Vote up 6 votes
private static void addSettings(IProject project, String workspaceRoot, List<String> targets,
    List<String> buildFlags) throws BackingStoreException {
  IScopeContext projectScope = new ProjectScope(project);
  Preferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
  int i = 0;
  for (String target : targets) {
    projectNode.put("target" + i, target);
    i++;
  }
  projectNode.put("workspaceRoot", workspaceRoot);
  i = 0;
  for (String flag : buildFlags) {
    projectNode.put("buildFlag" + i, flag);
    i++;
  }
  projectNode.flush();
}
 
Example 3
Project: PerformanceHat   File: AbstractFeedbackPropertyPage.java   Source Code and License Vote up 6 votes
private final IEclipsePreferences getProjectPreferences() {
  final IAdaptable element = getElement();
  IProject project = null;
  if (element instanceof IJavaProject) {
    project = ((IJavaProject) element).getProject();
  }
  else if (element instanceof IProject) {
    project = (IProject) element;
  }

  if (project != null) {
    final IScopeContext context = new ProjectScope(project);
    return context.getNode(BaseIds.ID);
  }
  return null;
}
 
Example 4
Project: filesync4eclipse   File: ProjectProperties.java   Source Code and License Vote up 6 votes
private void initPreferencesStore() {
    IScopeContext projectScope = new ProjectScope(project);
    preferences = projectScope.getNode(FileSyncPlugin.PLUGIN_ID);
    buildPathMap(preferences);
    preferences.addPreferenceChangeListener(this);
    preferences.addNodeChangeListener(this);
    IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
    manager.addValueVariableListener(this);
    jobChangeAdapter = new JobChangeAdapter(){
        @Override
        public void done(IJobChangeEvent event) {
            // XXX dirty trick to re-evaluate dynamic egit variables on branch change
            if(!event.getJob().getClass().getName().contains("org.eclipse.egit.ui.internal.branch.BranchOperationUI")){
                return;
            }
            rebuildPathMap();
        }
    };
    Job.getJobManager().addJobChangeListener(jobChangeAdapter);
    ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
}
 
Example 5
Project: Eclipse-Postfix-Code-Completion-Juno38   File: ProfileManager.java   Source Code and License Vote up 6 votes
/**
 * Update all formatter settings with the settings of the specified profile.
 * @param profile The profile to write to the preference store
 */
private void writeToPreferenceStore(Profile profile, IScopeContext context) {
	final Map<String, String> profileOptions= profile.getSettings();

	for (int i= 0; i < fKeySets.length; i++) {
        updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), profileOptions);
       }

	final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);
	if (uiPrefs.getInt(fProfileVersionKey, 0) != fProfileVersioner.getCurrentVersion()) {
		uiPrefs.putInt(fProfileVersionKey, fProfileVersioner.getCurrentVersion());
	}

	if (context.getName() == InstanceScope.SCOPE) {
		uiPrefs.put(fProfileKey, profile.getID());
	} else if (context.getName() == ProjectScope.SCOPE && !profile.isSharedProfile()) {
		uiPrefs.put(fProfileKey, profile.getID());
	}
}
 
Example 6
Project: Eclipse-Postfix-Code-Completion   File: ProfileManager.java   Source Code and License Vote up 6 votes
/**
 * Update all formatter settings with the settings of the specified profile.
 * @param profile The profile to write to the preference store
 */
private void writeToPreferenceStore(Profile profile, IScopeContext context) {
	final Map<String, String> profileOptions= profile.getSettings();

	for (int i= 0; i < fKeySets.length; i++) {
        updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), profileOptions);
       }

	final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);
	if (uiPrefs.getInt(fProfileVersionKey, 0) != fProfileVersioner.getCurrentVersion()) {
		uiPrefs.putInt(fProfileVersionKey, fProfileVersioner.getCurrentVersion());
	}

	if (context.getName() == InstanceScope.SCOPE) {
		uiPrefs.put(fProfileKey, profile.getID());
	} else if (context.getName() == ProjectScope.SCOPE && !profile.isSharedProfile()) {
		uiPrefs.put(fProfileKey, profile.getID());
	}
}
 
Example 7
Project: Eclipse-Postfix-Code-Completion   File: ProfileManager.java   Source Code and License Vote up 6 votes
protected void updateProfilesWithName(String oldName, Profile newProfile, boolean applySettings) {
	IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects();
	for (int i= 0; i < projects.length; i++) {
		IScopeContext projectScope= fPreferencesAccess.getProjectScope(projects[i]);
		IEclipsePreferences node= projectScope.getNode(JavaUI.ID_PLUGIN);
		String profileId= node.get(fProfileKey, null);
		if (oldName.equals(profileId)) {
			if (newProfile == null) {
				node.remove(fProfileKey);
			} else {
				if (applySettings) {
					writeToPreferenceStore(newProfile, projectScope);
				} else {
					node.put(fProfileKey, newProfile.getID());
				}
			}
		}
	}

	IScopeContext instanceScope= fPreferencesAccess.getInstanceScope();
	final IEclipsePreferences uiPrefs= instanceScope.getNode(JavaUI.ID_PLUGIN);
	if (newProfile != null && oldName.equals(uiPrefs.get(fProfileKey, null))) {
		writeToPreferenceStore(newProfile, instanceScope);
	}
}
 
Example 8
Project: AgentWorkbench   File: BundleProperties.java   Source Code and License Vote up 5 votes
/**
 * Returns the eclipse preferences.
 * @return the eclipse preferences
 */
public IEclipsePreferences getEclipsePreferences() {
	if (eclipsePreferences==null) {
		IScopeContext iScopeContext = ConfigurationScope.INSTANCE;
		eclipsePreferences = iScopeContext.getNode(PlugInActivator.PLUGIN_ID);
		eclipsePreferences.addPreferenceChangeListener(this.getChangeListener());
	}
	return eclipsePreferences;
}
 
Example 9
Project: gw4e.project   File: SettingsManagerTest.java   Source Code and License Vote up 5 votes
@Test
public void testRemove() throws Exception {
	IJavaProject pj = ProjectHelper.getOrCreateSimpleGW4EProject(PROJECT_NAME, false, false);
	String[] values = new String[] { PreferenceManager.SUFFIX_PREFERENCE_FOR_TEST_IMPLEMENTATION };
	SettingsManager.remove(pj.getProject(), values);

	IScopeContext context = new ProjectScope(pj.getProject());
	IEclipsePreferences projectPreferences = context.getNode(Activator.PLUGIN_ID);
	String val = projectPreferences.get(PreferenceManager.SUFFIX_PREFERENCE_FOR_TEST_IMPLEMENTATION, "");

	assertEquals("", val);
}
 
Example 10
Project: com.onpositive.prefeditor   File: PlatformPreferenceProvider.java   Source Code and License Vote up 5 votes
protected void addNodeListeners() {
	for (IScopeContext scopeContext : SCOPE_CONTEXTS) {
		try {
			IEclipsePreferences node = scopeContext.getNode("");
			node.accept((curNode) -> {
					curNode.addPreferenceChangeListener(changeListener);
					return true;
			});
			node.addNodeChangeListener(nodeListener);
		} catch (BackingStoreException e) {
			PrefEditorPlugin.log(e);
		}
	}
}
 
Example 11
Project: com.onpositive.prefeditor   File: PlatformPreferenceProvider.java   Source Code and License Vote up 5 votes
protected void removeNodeListeners() {
	for (IScopeContext scopeContext : SCOPE_CONTEXTS) {
		try {
			IEclipsePreferences node = scopeContext.getNode("");
			node.removeNodeChangeListener(nodeListener);
			node.accept((curNode) -> {
					curNode.removePreferenceChangeListener(changeListener);
					return true;
			});
		} catch (BackingStoreException e) {
			PrefEditorPlugin.log(e);
		}
	}
}
 
Example 12
Project: com.onpositive.prefeditor   File: PlatformPreferenceProvider.java   Source Code and License Vote up 5 votes
protected void loadPrefs() {
	try {
		for (IScopeContext scopeContext : SCOPE_CONTEXTS) {
			IEclipsePreferences node = scopeContext.getNode("");
			node.accept((curNode) -> {
										loadPrefsFromNode(curNode);
										return true;
									 });
		}
	} catch (BackingStoreException e) {
		PrefEditorPlugin.log(e);
	}
}
 
Example 13
Project: com.onpositive.prefeditor   File: PlatformPreferenceProvider.java   Source Code and License Vote up 5 votes
protected IEclipsePreferences getNode(String categoryName) {
	for (IScopeContext scopeContext : SCOPE_CONTEXTS) {
		String preffix = "/" + scopeContext.getName() + "/";
		if (categoryName.startsWith(preffix)) {
			IEclipsePreferences node = scopeContext.getNode(categoryName.substring(preffix.length()));
			return node;
		}
		
	}
	return null;
}
 
Example 14
Project: Hydrograph   File: ExportAction.java   Source Code and License Vote up 5 votes
private String readExportDataDefaultPathFromFile() {
	IScopeContext context = InstanceScope.INSTANCE;
	IEclipsePreferences eclipsePreferences = context.getNode(Activator.PLUGIN_ID);
	String exportDataDefaultpath = eclipsePreferences.get(EXPORT_DATA_DEFAULT_PATH, DEFAULT);
	exportDataDefaultpath = exportDataDefaultpath.equalsIgnoreCase(DEFAULT) ? " " : exportDataDefaultpath;
	return exportDataDefaultpath;
}
 
Example 15
Project: visuflow-plugin   File: ProjectPreferences.java   Source Code and License Vote up 5 votes
public void createPreferences() {
		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
		IScopeContext projectScope = new ProjectScope(project);
		IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
		for (String stmt : getStatementTypes()) {
//			pref.putInt(stmt, -16743169);
			pref.putInt(stmt, -6037505);
		}
		try {
			pref.flush();
		} catch (BackingStoreException e) {
			e.printStackTrace();
		}
	}
 
Example 16
Project: visuflow-plugin   File: ProjectPreferences.java   Source Code and License Vote up 5 votes
public void updateColorPreferences(String stmtType, int color) {
	IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
	IScopeContext projectScope = new ProjectScope(project);
	IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
	pref.putInt(stmtType, color);
	try {
		pref.flush();
	} catch (BackingStoreException e) {
		e.printStackTrace();
	}
}
 
Example 17
Project: visuflow-plugin   File: ProjectPreferences.java   Source Code and License Vote up 5 votes
public Map<String, Integer> getAllNodeColors() {
	HashMap<String, Integer> res = new HashMap<>();
	IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
	IScopeContext projectScope = new ProjectScope(project);
	IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
	for (String stmt : getStatementTypes()) {
		res.put(stmt, pref.getInt(stmt, 0));
	}
	return res;
}
 
Example 18
Project: eclipse-asciidoctools   File: AsciidocConfiguration.java   Source Code and License Vote up 5 votes
private static void createSettings(IProject project, String backend, String resourcesPath, String sourcesPath, String stylesheetPath,
		String targetPath) throws BackingStoreException {
	final IScopeContext projectScope = new ProjectScope(project);
	IEclipsePreferences preferences = projectScope.getNode(Activator.PLUGIN_ID);
	if (preferences.keys().length == 0) {
		preferences.put(BACKEND_PROPERTY, backend);
		preferences.put(RESOURCESPATH_PROPERTY, resourcesPath);
		preferences.put(SOURCESPATH_PROPERTY, sourcesPath);
		preferences.put(STYLESHEETPATH_PROPERTY, stylesheetPath);
		preferences.put(TARGETPATH_PROPERTY, targetPath);
		preferences.flush();
	}
}
 
Example 19
Project: eclipse   File: BazelProjectSupport.java   Source Code and License Vote up 5 votes
/**
 * List targets configure for <code>project</code>. Each project configured for Bazel is
 * configured to track certain targets and this function fetch this list from the project
 * preferences.
 */
public static List<String> getTargets(IProject project) throws BackingStoreException {
  // Get the list of targets from the preferences
  IScopeContext projectScope = new ProjectScope(project);
  Preferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
  ImmutableList.Builder<String> builder = ImmutableList.builder();
  for (String s : projectNode.keys()) {
    if (s.startsWith("target")) {
      builder.add(projectNode.get(s, ""));
    }
  }
  return builder.build();
}
 
Example 20
Project: eclipse   File: BazelProjectSupport.java   Source Code and License Vote up 5 votes
/**
 * List of build flags for <code>project</code>, taken from the project configuration
 */
public static List<String> getBuildFlags(IProject project) throws BackingStoreException {
  // Get the list of targets from the preferences
  IScopeContext projectScope = new ProjectScope(project);
  Preferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
  ImmutableList.Builder<String> builder = ImmutableList.builder();
  for (String s : projectNode.keys()) {
    if (s.startsWith("buildArgs")) {
      builder.add(projectNode.get(s, ""));
    }
  }
  return builder.build();
}
 
Example 21
Project: eclipse   File: BazelProjectSupport.java   Source Code and License Vote up 5 votes
/**
 * Return the {@link BazelInstance} corresponding to the given <code>project</code>. It looks for
 * the instance that runs for the workspace root configured for that project.
 *
 * @throws BazelNotFoundException
 */
public static BazelCommand.BazelInstance getBazelCommandInstance(IProject project)
    throws BackingStoreException, IOException, InterruptedException, BazelNotFoundException {
  IScopeContext projectScope = new ProjectScope(project.getProject());
  Preferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
  File workspaceRoot =
      new File(projectNode.get("workspaceRoot", project.getLocation().toFile().toString()));
  return Activator.getDefault().getCommand().getInstance(workspaceRoot);
}
 
Example 22
Project: eclipse   File: BazelProjectSupport.java   Source Code and License Vote up 5 votes
/**
 * Convert an Eclipse JDT project into an IntelliJ project view
 */
public static ProjectView getProjectView(IProject project)
    throws BackingStoreException, JavaModelException {
  com.google.devtools.bazel.e4b.projectviews.Builder builder = ProjectView.builder();
  IScopeContext projectScope = new ProjectScope(project);
  Preferences projectNode = projectScope.getNode(Activator.PLUGIN_ID);
  for (String s : projectNode.keys()) {
    if (s.startsWith("buildArgs")) {
      builder.addBuildFlag(projectNode.get(s, ""));
    } else if (s.startsWith("target")) {
      builder.addTarget(projectNode.get(s, ""));
    }
  }

  IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
  for (IClasspathEntry entry : ((IJavaProject) project).getRawClasspath()) {
    switch (entry.getEntryKind()) {
      case IClasspathEntry.CPE_SOURCE:
        IResource res = root.findMember(entry.getPath());
        if (res != null) {
          builder.addDirectory(res.getProjectRelativePath().removeFirstSegments(1).toOSString());
        }
        break;
      case IClasspathEntry.CPE_CONTAINER:
        String path = entry.getPath().toOSString();
        if (path.startsWith(STANDARD_VM_CONTAINER_PREFIX)) {
          builder.setJavaLanguageLevel(
              Integer.parseInt(path.substring(STANDARD_VM_CONTAINER_PREFIX.length())));
        }
        break;
    }
  }
  return builder.build();
}
 
Example 23
Project: CodeCheckerEclipsePlugin   File: CcConfiguration.java   Source Code and License Vote up 5 votes
public CcConfiguration(IProject project) {
    super();
    init();
    this.project = project;

    try {
        if (project.hasNature(CodeCheckerNature.NATURE_ID)) {
            IScopeContext context = new ProjectScope(project);
            projectPreferences = context.getNode(CodeCheckerNature.NATURE_ID);
        }
    } catch (CoreException e) {
        Logger.log(IStatus.ERROR, "" + e);
        Logger.log(IStatus.INFO, "" + e.getStackTrace());
    }
}
 
Example 24
Project: typescript.java   File: OptionsConfigurationBlock.java   Source Code and License Vote up 5 votes
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
	IEclipsePreferences node = context.getNode(fQualifier);
	if (manager != null) {
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example 25
Project: statecharts   File: DefaultResourceBlacklist.java   Source Code and License Vote up 5 votes
protected String getPersistentValues(IProject project) {
	IScopeContext projectScope = getPreferenceScope(project);
	IEclipsePreferences node = projectScope.getNode(SCT_RESOURCE_NODE);

	String string = node.get(SCT_BLACKLIST_KEY, SCT_BLACKLIST_DEFAULT);
	return string;
}
 
Example 26
Project: APICloud-Studio   File: Theme.java   Source Code and License Vote up 5 votes
private void delete(IScopeContext context)
{
	try
	{
		IEclipsePreferences prefs = context.getNode(ThemePlugin.PLUGIN_ID);
		Preferences preferences = prefs.node(ThemeManager.THEMES_NODE);
		preferences.remove(getName());
		preferences.flush();
	}
	catch (BackingStoreException e)
	{
		IdeLog.logError(ThemePlugin.getDefault(), e);
	}
}
 
Example 27
Project: APICloud-Studio   File: ThemeManager.java   Source Code and License Vote up 5 votes
/**
 * laziliy init the set of theme names.
 */
public synchronized Set<String> getThemeNames()
{
	if (fThemeNames == null)
	{
		fThemeNames = new HashSet<String>();
		// Add names of themes from builtins...
		fThemeNames.addAll(getBuiltinThemeNames());

		// Look in prefs to see what user themes are stored there, garb their names
		IScopeContext[] scopes = new IScopeContext[] { EclipseUtil.instanceScope(), EclipseUtil.defaultScope() };
		for (IScopeContext scope : scopes)
		{
			IEclipsePreferences prefs = scope.getNode(ThemePlugin.PLUGIN_ID);
			Preferences preferences = prefs.node(ThemeManager.THEMES_NODE);
			try
			{
				String[] themeNames = preferences.keys();
				fThemeNames.addAll(Arrays.asList(themeNames));
			}
			catch (BackingStoreException e)
			{
				IdeLog.logError(ThemePlugin.getDefault(), e);
			}
		}
	}
	return fThemeNames;
}
 
Example 28
Project: APICloud-Studio   File: PreferenceKey.java   Source Code and License Vote up 5 votes
public void flush(IScopeContext context)
{
	IEclipsePreferences node = context.getNode(fQualifier);
	if (node != null)
	{
		try
		{
			node.flush();
		}
		catch (BackingStoreException e)
		{
			IdeLog.logError(FormatterPlugin.getDefault(), "Error flushing a node", e, IDebugScopes.DEBUG); //$NON-NLS-1$
		}
	}
}
 
Example 29
Project: APICloud-Studio   File: PreferenceKey.java   Source Code and License Vote up 5 votes
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager)
{
	IEclipsePreferences node = context.getNode(fQualifier);
	if (manager != null)
	{
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example 30
Project: Eclipse-Postfix-Code-Completion   File: CleanUpPreferenceUtil.java   Source Code and License Vote up 5 votes
private static Map<String, String> loadFromProject(IScopeContext context) {
final Map<String, String> profileOptions= new HashMap<String, String>();
IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);

  	CleanUpProfileVersioner versioner= new CleanUpProfileVersioner();

  	CleanUpOptions defaultOptions= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS);
  	KeySet[] keySets= CleanUpProfileManager.KEY_SETS;

  	boolean hasValues= false;
for (int i= 0; i < keySets.length; i++) {
       KeySet keySet= keySets[i];
       IEclipsePreferences preferences= context.getNode(keySet.getNodeName());
       for (final Iterator<String> keyIter = keySet.getKeys().iterator(); keyIter.hasNext(); ) {
		final String key= keyIter.next();
		String val= preferences.get(key, null);
		if (val != null) {
			hasValues= true;
		} else {
			val= defaultOptions.getValue(key);
		}
		profileOptions.put(key, val);
	}
      }

if (!hasValues)
	return null;

int version= uiPrefs.getInt(CleanUpConstants.CLEANUP_SETTINGS_VERSION_KEY, versioner.getFirstVersion());
if (version == versioner.getCurrentVersion())
	return profileOptions;

CustomProfile profile= new CustomProfile("tmp", profileOptions, version, versioner.getProfileKind()); //$NON-NLS-1$
versioner.update(profile);
return profile.getSettings();
  }
 
Example 31
Project: Eclipse-Postfix-Code-Completion-Juno38   File: ProfileManager.java   Source Code and License Vote up 5 votes
public static boolean hasProjectSpecificSettings(IScopeContext context, KeySet[] keySets) {
	for (int i= 0; i < keySets.length; i++) {
        KeySet keySet= keySets[i];
        IEclipsePreferences preferences= context.getNode(keySet.getNodeName());
        for (final Iterator<String> keyIter= keySet.getKeys().iterator(); keyIter.hasNext();) {
            final String key= keyIter.next();
            Object val= preferences.get(key, null);
            if (val != null) {
            	return true;
            }
           }
       }
	return false;
}
 
Example 32
Project: ant-ivyde   File: RetrieveSetupManager.java   Source Code and License Vote up 5 votes
public List<StandaloneRetrieveSetup> getSetup(IProject project) throws IOException {

        IEclipsePreferences pref;
        synchronized (projectPrefs) {
            pref = 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<>();
        }
        List<StandaloneRetrieveSetup> retrieveSetups;

        StandaloneRetrieveSerializer serializer = new StandaloneRetrieveSerializer();
        ByteArrayInputStream in = new ByteArrayInputStream(retrieveSetup.getBytes());
        try {
            retrieveSetups = serializer.read(in, project);
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                // we don't care
            }
        }
        return retrieveSetups;
    }
 
Example 33
Project: Eclipse-Postfix-Code-Completion-Juno38   File: OptionsConfigurationBlock.java   Source Code and License Vote up 5 votes
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
	IEclipsePreferences node= context.getNode(fQualifier);
	if (manager != null) {
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example 34
Project: Eclipse-Postfix-Code-Completion   File: ProfileManager.java   Source Code and License Vote up 5 votes
public static boolean hasProjectSpecificSettings(IScopeContext context, KeySet[] keySets) {
	for (int i= 0; i < keySets.length; i++) {
        KeySet keySet= keySets[i];
        IEclipsePreferences preferences= context.getNode(keySet.getNodeName());
        for (final Iterator<String> keyIter= keySet.getKeys().iterator(); keyIter.hasNext();) {
            final String key= keyIter.next();
            Object val= preferences.get(key, null);
            if (val != null) {
            	return true;
            }
           }
       }
	return false;
}
 
Example 35
Project: baseliner   File: BaselinerPreferences.java   Source Code and License Vote up 5 votes
public static void setJarProviderSources(IProject project, String value) throws BackingStoreException {
	IScopeContext context = new ProjectScope(project);
	IEclipsePreferences node = context.getNode(PREFERENCES_QUALIFIER);
	if (node != null) {
		node.put(KEY_JAR_SOURCE, value);
	}
	node.sync();
}
 
Example 36
Project: Eclipse-Postfix-Code-Completion   File: ProfileManager.java   Source Code and License Vote up 5 votes
public void clearAllSettings(IScopeContext context) {
	for (int i= 0; i < fKeySets.length; i++) {
        updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), Collections.<String, String>emptyMap());
       }

	final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);
	uiPrefs.remove(fProfileKey);
}
 
Example 37
Project: Eclipse-Postfix-Code-Completion   File: OptionsConfigurationBlock.java   Source Code and License Vote up 5 votes
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
	IEclipsePreferences node= context.getNode(fQualifier);
	if (manager != null) {
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example 38
Project: Eclipse-Postfix-Code-Completion-Juno38   File: CleanUpPreferenceUtil.java   Source Code and License Vote up 5 votes
private static Map<String, String> loadFromProject(IScopeContext context) {
final Map<String, String> profileOptions= new HashMap<String, String>();
IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);

  	CleanUpProfileVersioner versioner= new CleanUpProfileVersioner();

  	CleanUpOptions defaultOptions= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_CLEAN_UP_OPTIONS);
  	KeySet[] keySets= CleanUpProfileManager.KEY_SETS;

  	boolean hasValues= false;
for (int i= 0; i < keySets.length; i++) {
       KeySet keySet= keySets[i];
       IEclipsePreferences preferences= context.getNode(keySet.getNodeName());
       for (final Iterator<String> keyIter = keySet.getKeys().iterator(); keyIter.hasNext(); ) {
		final String key= keyIter.next();
		String val= preferences.get(key, null);
		if (val != null) {
			hasValues= true;
		} else {
			val= defaultOptions.getValue(key);
		}
		profileOptions.put(key, val);
	}
      }

if (!hasValues)
	return null;

int version= uiPrefs.getInt(CleanUpConstants.CLEANUP_SETTINGS_VERSION_KEY, versioner.getFirstVersion());
if (version == versioner.getCurrentVersion())
	return profileOptions;

CustomProfile profile= new CustomProfile("tmp", profileOptions, version, versioner.getProfileKind()); //$NON-NLS-1$
versioner.update(profile);
return profile.getSettings();
  }
 
Example 39
Project: Eclipse-Postfix-Code-Completion-Juno38   File: CleanUpPreferenceUtil.java   Source Code and License Vote up 5 votes
public static void saveSaveParticipantOptions(IScopeContext context, Map<String, String> settings) {
	IEclipsePreferences node= context.getNode(JavaUI.ID_PLUGIN);
	for (Iterator<String> iterator= settings.keySet().iterator(); iterator.hasNext();) {
     String key= iterator.next();
     node.put(SAVE_PARTICIPANT_KEY_PREFIX + key, settings.get(key));
    }
}
 
Example 40
Project: Eclipse-Postfix-Code-Completion-Juno38   File: CleanUpPreferenceUtil.java   Source Code and License Vote up 5 votes
public static boolean hasSettingsInScope(IScopeContext context) {
  	IEclipsePreferences node= context.getNode(JavaUI.ID_PLUGIN);

  	Set<String> keys= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getKeys();
for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) {
	String key= iterator.next();
	if (node.get(SAVE_PARTICIPANT_KEY_PREFIX + key, null) != null)
		return true;
      }

  	return false;
  }
 
Example 41
Project: Eclipse-Postfix-Code-Completion-Juno38   File: ProfileManager.java   Source Code and License Vote up 5 votes
/**
 * Only to read project specific settings to find out to what profile it matches.
 * @param context The project context
 */
private Map<String, String> readFromPreferenceStore(IScopeContext context, Profile workspaceProfile) {
	final Map<String, String> profileOptions= new HashMap<String, String>();
	IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN);

	int version= uiPrefs.getInt(fProfileVersionKey, fProfileVersioner.getFirstVersion());
	if (version != fProfileVersioner.getCurrentVersion()) {
		Map<String, String> allOptions= new HashMap<String, String>();
		for (int i= 0; i < fKeySets.length; i++) {
            addAll(context.getNode(fKeySets[i].getNodeName()), allOptions);
           }
		CustomProfile profile= new CustomProfile("tmp", allOptions, version, fProfileVersioner.getProfileKind()); //$NON-NLS-1$
		fProfileVersioner.update(profile);
		return profile.getSettings();
	}

	boolean hasValues= false;
	for (int i= 0; i < fKeySets.length; i++) {
        KeySet keySet= fKeySets[i];
        IEclipsePreferences preferences= context.getNode(keySet.getNodeName());
        for (final Iterator<String> keyIter = keySet.getKeys().iterator(); keyIter.hasNext(); ) {
			final String key= keyIter.next();
			String val= preferences.get(key, null);
			if (val != null) {
				hasValues= true;
			} else {
				val= workspaceProfile.getSettings().get(key);
			}
			profileOptions.put(key, val);
		}
       }

	if (!hasValues) {
		return null;
	}

	setLatestCompliance(profileOptions);
	return profileOptions;
}
 
Example 42
Project: vertigo-chroma-kspplugin   File: PropertyUtils.java   Source Code and License Vote up 4 votes
private static IEclipsePreferences getProjectPluginNode(IProject project) {
	IScopeContext projectScope = new ProjectScope(project);
	return projectScope.getNode(Activator.PLUGIN_ID);
}
 
Example 43
Project: visuflow-plugin   File: ProjectPreferences.java   Source Code and License Vote up 4 votes
public Integer getColorForNode(String node) {
	IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
	IScopeContext projectScope = new ProjectScope(project);
	IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
	return pref.getInt(node, 0);
}
 
Example 44
Project: jsweet-eclipse-plugin   File: ProjectPreferenceStore.java   Source Code and License Vote up 4 votes
private IEclipsePreferences getProjectPreferences() {
	IScopeContext projectScope = new ProjectScope(this.project);
	return projectScope.getNode(JSweetPlugin.ID);
}
 
Example 45
Project: che   File: JavaProject.java   Source Code and License Vote up 4 votes
/**
 * Returns the project custom preference pool. Project preferences may include custom encoding.
 *
 * @return IEclipsePreferences or <code>null</code> if the project does not have a java nature.
 */
public IEclipsePreferences getEclipsePreferences() {
  if (!org.eclipse.jdt.internal.core.JavaProject.hasJavaNature(this.project)) return null;
  // Get cached preferences if exist
  PerProjectInfo perProjectInfo = 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();
  //        if (eclipseParentPreferences != null) {
  //            if (this.preferencesNodeListener != null) {
  //
  // eclipseParentPreferences.removeNodeChangeListener(this.preferencesNodeListener);
  //            }
  //            this.preferencesNodeListener = new IEclipsePreferences.INodeChangeListener() {
  //                public void added(IEclipsePreferences.NodeChangeEvent event) {
  //                    // do nothing
  //                }
  //                public void removed(IEclipsePreferences.NodeChangeEvent event) {
  //                    if (event.getChild() == eclipsePreferences) {
  //
  // JavaModelManager.getJavaModelManager().resetProjectPreferences(JavaProject.this);
  //                    }
  //                }
  //            };
  //            eclipseParentPreferences.addNodeChangeListener(this.preferencesNodeListener);
  //        }

  //        // Listen to preferences changes
  //        if (this.preferencesChangeListener != null) {
  //            eclipsePreferences.removePreferenceChangeListener(this.preferencesChangeListener);
  //        }
  //        this.preferencesChangeListener = new IEclipsePreferences.IPreferenceChangeListener() {
  //            public void preferenceChange(IEclipsePreferences.PreferenceChangeEvent event) {
  //                String propertyName = event.getKey();
  //                JavaModelManager manager = JavaModelManager.getJavaModelManager();
  //                if (propertyName.startsWith(JavaCore.PLUGIN_ID)) {
  //                    if (propertyName.equals(JavaCore.CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER) ||
  //                        propertyName.equals(JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER) ||
  //                        propertyName.equals(JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE) ||
  //
  // propertyName.equals(JavaCore.CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER)
  // ||
  //                        propertyName.equals(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH) ||
  //                        propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS)
  // ||
  //
  // propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS) ||
  //                        propertyName.equals(JavaCore.CORE_INCOMPLETE_CLASSPATH) ||
  //                        propertyName.equals(JavaCore.CORE_CIRCULAR_CLASSPATH) ||
  //
  // propertyName.equals(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE) ||
  //                        propertyName.equals(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL) ||
  //                        propertyName.equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM))
  //                    {
  //                        manager.deltaState.addClasspathValidation(JavaProject.this);
  //                    }
  //                    manager.resetProjectOptions(JavaProject.this);
  //                    JavaProject.this.resetCaches(); // see
  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=233568
  //                }
  //            }
  //        };
  //        eclipsePreferences.addPreferenceChangeListener(this.preferencesChangeListener);
  return eclipsePreferences;
}
 
Example 46
Project: openhab-hdl   File: PreferenceInitializer.java   Source Code and License Vote up 4 votes
public void initializeDefaultPreferences() {
	IScopeContext context = DefaultScope.INSTANCE;
	IEclipsePreferences node = context.getNode(CoreActivator.getDefault().getBundle().getSymbolicName());
	String folderPath = ConfigConstants.MAIN_CONFIG_FOLDER;
	node.put(DesignerCoreConstants.CONFIG_FOLDER_PREFERENCE, folderPath);
}
 
Example 47
Project: gwt-eclipse-plugin   File: WebAppProjectProperties.java   Source Code and License Vote up 4 votes
private static IEclipsePreferences getProjectProperties(IProject project) {
  IScopeContext projectScope = new ProjectScope(project);
  return projectScope.getNode(CorePlugin.PLUGIN_ID);
}
 
Example 48
Project: gwt-eclipse-plugin   File: GWTProjectProperties.java   Source Code and License Vote up 4 votes
private static IEclipsePreferences getProjectProperties(IProject project) {
  IScopeContext projectScope = new ProjectScope(project);
  return projectScope.getNode(GWTPlugin.PLUGIN_ID);
}
 
Example 49
Project: PerformanceHat   File: FeedbackProjectImpl.java   Source Code and License Vote up 4 votes
/**
 * {@inheritDoc}
 */
@Override
public IEclipsePreferences getFeedbackProperties() {
  final IScopeContext context = new ProjectScope(project);
  return context.getNode(BaseIds.ID);
}
 
Example 50
Project: eclipseforces   File: EclipseForcesPlugin.java   Source Code and License Vote up 4 votes
public static IEclipsePreferences getProjectPrefs(IProject project) {
  IScopeContext context = new ProjectScope(project);
  IEclipsePreferences prefs = context.getNode(EclipseForcesPlugin.PLUGIN_ID);
  return prefs;
}
 
Example 51
Project: Eclipse-Postfix-Code-Completion-Juno38   File: JavaProject.java   Source Code and License Vote up 4 votes
/**
 * Returns the project custom preference pool.
 * Project preferences may include custom encoding.
 * @return IEclipsePreferences or <code>null</code> if the project
 * 	does not have a java nature.
 */
public IEclipsePreferences getEclipsePreferences() {
	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();
	if (eclipseParentPreferences != null) {
		if (this.preferencesNodeListener != null) {
			eclipseParentPreferences.removeNodeChangeListener(this.preferencesNodeListener);
		}
		this.preferencesNodeListener = new IEclipsePreferences.INodeChangeListener() {
			public void added(IEclipsePreferences.NodeChangeEvent event) {
				// do nothing
			}
			public void removed(IEclipsePreferences.NodeChangeEvent event) {
				if (event.getChild() == eclipsePreferences) {
					JavaModelManager.getJavaModelManager().resetProjectPreferences(JavaProject.this);
				}
			}
		};
		eclipseParentPreferences.addNodeChangeListener(this.preferencesNodeListener);
	}

	// Listen to preferences changes
	if (this.preferencesChangeListener != null) {
		eclipsePreferences.removePreferenceChangeListener(this.preferencesChangeListener);
	}
	this.preferencesChangeListener = new IEclipsePreferences.IPreferenceChangeListener() {
		public void preferenceChange(IEclipsePreferences.PreferenceChangeEvent event) {
			String propertyName = event.getKey();
			JavaModelManager manager = JavaModelManager.getJavaModelManager();
			if (propertyName.startsWith(JavaCore.PLUGIN_ID)) {
				if (propertyName.equals(JavaCore.CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS) ||
					propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS) ||
					propertyName.equals(JavaCore.CORE_INCOMPLETE_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_CIRCULAR_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE) ||
					propertyName.equals(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL))
				{
					manager.deltaState.addClasspathValidation(JavaProject.this);
				}
				manager.resetProjectOptions(JavaProject.this);
				JavaProject.this.resetCaches(); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=233568
			}
		}
	};
	eclipsePreferences.addPreferenceChangeListener(this.preferencesChangeListener);
	return eclipsePreferences;
}
 
Example 52
Project: wt-studio   File: TomcatStartup.java   Source Code and License Vote up 4 votes
private void disableSpellCheck() {
	IScopeContext context = new InstanceScope();
	IEclipsePreferences prefs = context.getNode("org.eclipse.ui.editors");
	prefs.putBoolean("spellingEnabled", false);
}
 
Example 53
Project: Eclipse-Postfix-Code-Completion   File: JavaProject.java   Source Code and License Vote up 4 votes
/**
 * Returns the project custom preference pool.
 * Project preferences may include custom encoding.
 * @return IEclipsePreferences or <code>null</code> if the project
 * 	does not have a java nature.
 */
public IEclipsePreferences getEclipsePreferences() {
	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();
	if (eclipseParentPreferences != null) {
		if (this.preferencesNodeListener != null) {
			eclipseParentPreferences.removeNodeChangeListener(this.preferencesNodeListener);
		}
		this.preferencesNodeListener = new IEclipsePreferences.INodeChangeListener() {
			public void added(IEclipsePreferences.NodeChangeEvent event) {
				// do nothing
			}
			public void removed(IEclipsePreferences.NodeChangeEvent event) {
				if (event.getChild() == eclipsePreferences) {
					JavaModelManager.getJavaModelManager().resetProjectPreferences(JavaProject.this);
				}
			}
		};
		eclipseParentPreferences.addNodeChangeListener(this.preferencesNodeListener);
	}

	// Listen to preferences changes
	if (this.preferencesChangeListener != null) {
		eclipsePreferences.removePreferenceChangeListener(this.preferencesChangeListener);
	}
	this.preferencesChangeListener = new IEclipsePreferences.IPreferenceChangeListener() {
		public void preferenceChange(IEclipsePreferences.PreferenceChangeEvent event) {
			String propertyName = event.getKey();
			JavaModelManager manager = JavaModelManager.getJavaModelManager();
			if (propertyName.startsWith(JavaCore.PLUGIN_ID)) {
				if (propertyName.equals(JavaCore.CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER) ||
					propertyName.equals(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS) ||
					propertyName.equals(JavaCore.CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS) ||
					propertyName.equals(JavaCore.CORE_INCOMPLETE_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_CIRCULAR_CLASSPATH) ||
					propertyName.equals(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE) ||
					propertyName.equals(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL) ||
					propertyName.equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM))
				{
					manager.deltaState.addClasspathValidation(JavaProject.this);
				}
				manager.resetProjectOptions(JavaProject.this);
				JavaProject.this.resetCaches(); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=233568
			}
		}
	};
	eclipsePreferences.addPreferenceChangeListener(this.preferencesChangeListener);
	return eclipsePreferences;
}
 
Example 54
Project: wt-studio   File: StudioStartup.java   Source Code and License Vote up 4 votes
private void disableSpellCheck() {
	IScopeContext context = new InstanceScope();
	IEclipsePreferences prefs = context.getNode("org.eclipse.ui.editors");
	prefs.putBoolean("spellingEnabled", false);
}
 
Example 55
Project: gw4e.project   File: SettingsManager.java   Source Code and License Vote up 2 votes
/**
 * Set the preference value for the project and the passed key
 * 
 * @param project
 * @param key
 * @param value
 */
private static IEclipsePreferences getProjectPreference(IProject project) {
	IScopeContext context = new ProjectScope(project);
	IEclipsePreferences projectPreferences = context.getNode(Activator.PLUGIN_ID);
	return projectPreferences;
}
 
Example 56
Project: gw4e.project   File: SettingsManager.java   Source Code and License Vote up 2 votes
/**
 * Set the global preference value for the passed key
 * 
 * @param project
 * @param key
 * @param value
 */
public static IEclipsePreferences getGlobalPreference() {
	IScopeContext context = ConfigurationScope.INSTANCE;
	IEclipsePreferences projectPreferences = context.getNode(Activator.PLUGIN_ID);
	return projectPreferences;
}
 
Example 57
Project: OpenSPIFe   File: PreferenceUtils.java   Source Code and License Vote up 2 votes
/**
 * Return the IEclipsePreferences node associated with this store.
 * 
 * @return the preference node for this store
 */
public static IEclipsePreferences getPreferences(IScopeContext context, Plugin plugin) {
	return context.getNode(getSymbolicName(plugin));
}