All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.core.runtime.preferences.IScopeContext Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2004, 2015 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.runtime.preferences;

import org.eclipse.core.runtime.IPath;

/**
 * Clients implement this interface to provide context to a
 * particular scope. Instances of implementations of this interface are
 * passed to the {@link IPreferencesService} for use in
 * preference searching.
 * 

* Clients may implement this interface. *

* * @see IPreferencesService * @since 3.0 */ public interface IScopeContext { /** * Property used when a scope context is registered as a service to distinguish * different scopes * * @since 3.10 */ static String PROPERTY_TYPE = "type"; //$NON-NLS-1$ /** * Type of a scope context that provides access to a bundle scoped context where * {@link IScopeContext#getLocation()} returns the bundles state location, and * {@link IScopeContext#getNode(String)} returns the preferences for this * particular bundle. The bundle is always the one that acquires the * service and not that calling the methods! * * @since 3.10 */ static String TYPE_BUNDLE = "bundle"; //$NON-NLS-1$ /** * A filter that could be used to acquire a bundle scoped context, see * {@link #TYPE_BUNDLE} for details. * * @since 3.10 */ static String BUNDLE_SCOPE_FILTER = "(&(objectClass=org.eclipse.core.runtime.preferences.IScopeContext)(" //$NON-NLS-1$ + PROPERTY_TYPE + "=" + TYPE_BUNDLE + "))"; //$NON-NLS-1$ //$NON-NLS-2$ /** * Return the name of the scope that this context is associated with. * Must not be null. * * @return the name of the scope */ public String getName(); /** * Return the preferences node that contains the preferences for the * given qualifier or null if the node cannot be determined. * The given qualifier must not be null but may be a path * to a sub-node within the scope. *

* An example of a qualifier in Eclipse 2.1 would be the plug-in identifier that * the preference is associated with (e.g. the "org.eclipse.core.resources" * plug-in defines the "description.autobuild" preference). *

* This method can be used to determine the appropriate preferences node * to aid in setting key/value pairs. For instance: * new InstanceScope().getNode("org.eclipse.core.resources"); * returns the preference node in the instance scope where the preferences * for "org.eclipse.core.resources" are stored. *

* @param qualifier a qualifier for the preference name * @return the node containing the plug-in preferences or null * @see IPreferencesService */ public IEclipsePreferences getNode(String qualifier); /** * Return a path to a location in the file-system where clients are able * to write files that will have the same sharing/scope properties as * preferences defined in this scope. *

* Implementors may return null if the location is not known, * is unavailable, or is not applicable to this scope. *

* @return a writable location in the file system or null */ public IPath getLocation(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy