|
||||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.emf.common.EMFPlugin
EMF must run within an Eclipse workbench, within a headless Eclipse workspace, or just stand-alone as part of some other application. To support this, all resource access (e.g., NL strings, images, and so on) is directed to the resource locator methods, which can redirect the service as appopriate to the runtime. During Eclipse invocation, the implementation delegates to a plugin implementation. During stand-alone invocation, no plugin initialization takes place, so the implementation delegates to a resource JAR on the CLASSPATH. The resource jar will typically not be on the CLASSPATH during Eclipse invocation. It will contain things like the icons and the .properties, which are available in a different way during Eclipse invocation.
ResourceLocator,
Logger| Inner Class Summary | |
|---|---|
static class |
EMFPlugin.EclipsePlugin
The actual implementation of an Eclipse Plugin. |
| Field Summary | |
|---|---|
protected java.net.URL |
baseURL
|
protected ResourceLocator[] |
delegateResourceLocators
|
protected java.util.Map |
images
|
protected java.util.ResourceBundle |
resourceBundle
|
protected java.util.Map |
strings
|
| Constructor Summary | |
|---|---|
EMFPlugin(ResourceLocator[] delegateResourceLocators)
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
delegatedGetImage(java.lang.String key)
Does the work of fetching the image associated with the key, when the image resource is not available locally. |
protected java.lang.String |
delegatedGetString(java.lang.String key)
Does the work of fetching the string associated with the key, when the string resource is not available locally. |
protected java.lang.Object |
doGetImage(java.lang.String key)
Does the work of fetching the image associated with the key. |
java.net.URL |
getBaseURL()
Returns the URL from which all resources are based. |
java.lang.Object |
getImage(java.lang.String key)
Returns the description that can be used to create the image resource associated with the key. |
Logger |
getPluginLogger()
Returns an Eclipse plugin implementation of a logger. |
abstract ResourceLocator |
getPluginResourceLocator()
Returns an Eclipse plugin implementation of a resource locator. |
java.lang.String |
getString(java.lang.String key)
Returns the string resource associated with the key. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object[] substitutions)
Returns a string resource associated with the key, and peforms substitutions. |
void |
log(java.lang.Object logEntry)
Logs an entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ResourceLocator[] delegateResourceLocators
protected java.net.URL baseURL
protected java.util.ResourceBundle resourceBundle
protected java.util.Map strings
protected java.util.Map images
| Constructor Detail |
public EMFPlugin(ResourceLocator[] delegateResourceLocators)
| Method Detail |
public abstract ResourceLocator getPluginResourceLocator()
public Logger getPluginLogger()
public java.net.URL getBaseURL()
ResourceLocatorgetBaseURL in interface ResourceLocatororg.eclipse.emf.common.util.ResourceLocatorpublic java.lang.Object getImage(java.lang.String key)
ResourceLocatorgetImage in interface ResourceLocatororg.eclipse.emf.common.util.ResourceLocatorkey - the key of the image resource.
protected java.lang.Object doGetImage(java.lang.String key)
throws java.io.IOException
key - the key of the image to fetch.java.io.IOException - if an image doesn't exist.
protected java.lang.Object delegatedGetImage(java.lang.String key)
throws java.util.MissingResourceException
key - the key of the image to fetch.java.util.MissingResourceException - if the image resource doesn't exist anywhere.delegateResourceLocatorspublic java.lang.String getString(java.lang.String key)
ResourceLocatorgetString in interface ResourceLocatororg.eclipse.emf.common.util.ResourceLocatorkey - the key of the string resource.protected java.lang.String delegatedGetString(java.lang.String key)
key - the key of the string to fetch.java.util.MissingResourceException - if the string resource doesn't exist anywhere.delegateResourceLocators
public java.lang.String getString(java.lang.String key,
java.lang.Object[] substitutions)
ResourceLocatorgetString in interface ResourceLocatororg.eclipse.emf.common.util.ResourceLocatorkey - the key of the string.substitutions - the message substitutions.ResourceLocator.getString(String),
MessageFormat.format(String, Object[])public void log(java.lang.Object logEntry)
Loggerlog in interface Loggerorg.eclipse.emf.common.util.LoggerlogEntry - a plastic entry to log.
|
Copyright 2001-2003 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||