Search in sources :

Example 41 with IScopeContext

use of org.eclipse.core.runtime.preferences.IScopeContext in project erlide_eclipse by erlang.

the class ErlideUIPlugin method getPrefsNode.

public static IEclipsePreferences getPrefsNode() {
    final String qualifier = ErlideUIPlugin.PLUGIN_ID;
    final IScopeContext context = InstanceScope.INSTANCE;
    final IEclipsePreferences eclipsePreferences = context.getNode(qualifier);
    return eclipsePreferences;
}
Also used : IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences)

Example 42 with IScopeContext

use of org.eclipse.core.runtime.preferences.IScopeContext in project erlide_eclipse by erlang.

the class ErlangOutlinePage method getPrefsNode.

public static IEclipsePreferences getPrefsNode() {
    final String qualifier = ErlideUIPlugin.PLUGIN_ID;
    final IScopeContext context = InstanceScope.INSTANCE;
    final IEclipsePreferences eclipsePreferences = context.getNode(qualifier);
    return eclipsePreferences;
}
Also used : IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences)

Example 43 with IScopeContext

use of org.eclipse.core.runtime.preferences.IScopeContext in project erlide_eclipse by erlang.

the class CodeAssistPreferences method getNode.

public static IEclipsePreferences getNode() {
    final IScopeContext context = InstanceScope.INSTANCE;
    final IEclipsePreferences eclipsePreferences = context.getNode(CodeAssistPreferences.QUALIFIER);
    return eclipsePreferences;
}
Also used : IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences)

Example 44 with IScopeContext

use of org.eclipse.core.runtime.preferences.IScopeContext in project erlide_eclipse by erlang.

the class PreferencesHelper method hasAnyAtLowestScope.

public boolean hasAnyAtLowestScope() {
    final IScopeContext sc = storeContext;
    final IEclipsePreferences p = sc.getNode(qualifier);
    if (p != null) {
        try {
            final String[] keys = p.keys();
            return keys.length > 0;
        } catch (final BackingStoreException e) {
        }
    }
    return false;
}
Also used : IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences) BackingStoreException(org.osgi.service.prefs.BackingStoreException)

Example 45 with IScopeContext

use of org.eclipse.core.runtime.preferences.IScopeContext in project erlide_eclipse by erlang.

the class PreferencesHelper method getNextContexts.

public static IScopeContext[] getNextContexts(final IScopeContext[] list, final IScopeContext item) {
    final List<IScopeContext> result = new ArrayList<>();
    boolean found = false;
    for (final IScopeContext ctx : list) {
        if (found) {
            result.add(ctx);
        }
        if (ctx.equals(item)) {
            found = true;
        }
    }
    return result.toArray(new IScopeContext[result.size()]);
}
Also used : IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) ArrayList(java.util.ArrayList)

Aggregations

IScopeContext (org.eclipse.core.runtime.preferences.IScopeContext)73 ProjectScope (org.eclipse.core.resources.ProjectScope)42 IEclipsePreferences (org.eclipse.core.runtime.preferences.IEclipsePreferences)17 InstanceScope (org.eclipse.core.runtime.preferences.InstanceScope)16 DefaultScope (org.eclipse.core.runtime.preferences.DefaultScope)15 BackingStoreException (org.osgi.service.prefs.BackingStoreException)15 Preferences (org.osgi.service.prefs.Preferences)14 IProject (org.eclipse.core.resources.IProject)13 CoreException (org.eclipse.core.runtime.CoreException)8 ArrayList (java.util.ArrayList)6 IResource (org.eclipse.core.resources.IResource)6 ILiferayProjectProvider (com.liferay.ide.core.ILiferayProjectProvider)5 Iterator (java.util.Iterator)5 HashSet (java.util.HashSet)4 List (java.util.List)4 Set (java.util.Set)4 IFile (org.eclipse.core.resources.IFile)4 IAdaptable (org.eclipse.core.runtime.IAdaptable)4 PreferencesAccess (org.eclipse.jdt.internal.ui.preferences.PreferencesAccess)4 FormatterProfileStore (org.eclipse.jdt.internal.ui.preferences.formatter.FormatterProfileStore)4