public final class CommonPlugin extends EMFPlugin
INSTANCE| Modifier and Type | Class and Description |
|---|---|
static class |
CommonPlugin.ElementRecord
A simple representation of an element in a
plugin.xml. |
static class |
CommonPlugin.Implementation
The actual implementation of the Eclipse Plugin.
|
static class |
CommonPlugin.SimpleTargetPlatformRegistryImpl<K,V>
A specialized
HashMap map that supports computing information from the target platform, if the PDE is available. |
EMFPlugin.EclipsePlugin, EMFPlugin.InternalEclipsePlugin, EMFPlugin.InternalHelper, EMFPlugin.OSGiDelegatingBundleActivator| Modifier and Type | Field and Description |
|---|---|
static CommonPlugin |
INSTANCE
The singleton instance of the plugin.
|
delegateResourceLocators, IS_ECLIPSE_RUNNING, IS_RESOURCES_BUNDLE_AVAILABLEbaseURL, bundleLocalization, images, resourceBundle, shouldTranslate, strings, untranslatedResourceBundle, untranslatedStrings| Modifier and Type | Method and Description |
|---|---|
static URI |
asLocalURI(URI uri)
Use the platform, if available, to convert to a local URI.
|
java.util.Comparator<java.lang.String> |
getComparator()
Returns a string comparator appropriate for collating strings for the
current locale. |
java.util.Comparator<java.lang.String> |
getComparator(java.util.Locale locale)
Returns a string comparator appropriate for collating strings for the give locale.
|
static CommonPlugin.Implementation |
getPlugin()
Returns the singleton instance of the Eclipse plugin.
|
ResourceLocator |
getPluginResourceLocator()
Returns an Eclipse plugin implementation of a resource locator.
|
static java.util.Map<java.lang.String,URI> |
getTargetPlatformBundleMappings()
Computes a map from bundle symbolic name to the bundle's location URI.
|
static java.util.Map<java.lang.String,java.util.List<CommonPlugin.ElementRecord>> |
getTargetPlatformExtensionPoints(java.util.Set<java.lang.String> extensionPoints)
Computes a list of
element records for each requested extension point. |
static java.lang.Class<?> |
loadClass(java.lang.String pluginID,
java.lang.String className)
Use the platform, if available, to load the named class using the right class loader.
|
static URI |
resolve(URI uri)
Use the platform, if available, to resolve the URI.
|
getDelegateResourceLocators, getPluginLogger, getPrimaryResourceLocator, getSymbolicName, log, maindelegatedGetImage, delegatedGetString, doGetImage, doGetString, extensionFor, getBaseURL, getBundleLocalization, getImage, getString, getString, getString, getString, setShouldTranslate, shouldTranslateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBaseURL, getImage, getString, getString, getString, getStringpublic static final CommonPlugin INSTANCE
public ResourceLocator getPluginResourceLocator()
EMFPlugingetPluginResourceLocator in class EMFPluginpublic static CommonPlugin.Implementation getPlugin()
public static URI asLocalURI(URI uri)
public static java.lang.Class<?> loadClass(java.lang.String pluginID,
java.lang.String className)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic static java.util.Map<java.lang.String,java.util.List<CommonPlugin.ElementRecord>> getTargetPlatformExtensionPoints(java.util.Set<java.lang.String> extensionPoints)
element records for each requested extension point.
Each key in the map is extension point ID.
The corresponding value is a list of the extension point element records associated with that extension point.
Each root element record has synthetic attributes derived from the extension point:
pointsymbolicNamelocationplatform:/resource/org.example.plugin for an extension point in the workspace,
file:/folder/org.eclipse.plugin for folder bundle in the target platform,
or archive:file:/file/folder/org.example.plugin.jar!/ for a jarred bundle in the target platform.
This is useful for resolving a relative path in attribute value to its absolute path in the bundle.
This method uses the Plug-in Development Environment (PDE) to compute the results. It will include results for plug-ins in the workspace as well as for plug-ins in the target platform. If PDE is not available, this information cannot be computed.
extensionPoints - a set of extension points to query; if it's null or empty, all extension points will be queried.null if PDE is not available.public static java.util.Map<java.lang.String,URI> getTargetPlatformBundleMappings()
This method uses the Plug-in Development Environment (PDE) to compute the results. It will include results for plug-ins in the workspace as well as for plug-ins in the target platform. If PDE is not available, this information cannot be computed.
null if PDE is not available.public java.util.Comparator<java.lang.String> getComparator()
current locale.current locale.public java.util.Comparator<java.lang.String> getComparator(java.util.Locale locale)
Collator otherwise.locale - the locale for which a comparator is needed.Copyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature