org.eclipse.emf.common.util
Interface ResourceLocator

All Known Implementing Classes:
EclipseUIPlugin, EMFPlugin, EMFPlugin.EclipsePlugin, ItemProviderAdapter

public interface ResourceLocator

A locator of Java resources.


Method Summary
 URL getBaseURL()
          Returns the URL from which all resources are based.
 Object getImage(String key)
          Returns the description that can be used to create the image resource associated with the key.
 String getString(String key)
          Returns the string resource associated with the key.
 String getString(String key, boolean translate)
          Returns the string resource associated with the key.
 String getString(String key, Object[] substitutions)
          Returns a string resource associated with the key, and peforms substitutions.
 String getString(String key, Object[] substitutions, boolean translate)
          Returns a string resource associated with the key, and peforms substitutions.
 

Method Detail

getBaseURL

public URL getBaseURL()
Returns the URL from which all resources are based.

Returns:
the URL from which all resources are based.

getImage

public Object getImage(String key)
Returns the description that can be used to create the image resource associated with the key. The description will typically be in the form of a URL to the image data. Creation of an actual image depends on the GUI environment; within Eclipse, org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry can be used.

Parameters:
key - the key of the image resource.
Returns:
the description on the image resource.

getString

public String getString(String key)
Returns the string resource associated with the key.

Parameters:
key - the key of the string resource.
Returns:
the string resource associated with the key.

getString

public String getString(String key,
                        boolean translate)
Returns the string resource associated with the key.

Parameters:
key - the key of the string resource.
translate - whether the result is to be translated to the current locale.
Returns:
the string resource associated with the key.

getString

public String getString(String key,
                        Object[] substitutions)
Returns a string resource associated with the key, and peforms substitutions.

Parameters:
key - the key of the string.
substitutions - the message substitutions.
Returns:
a string resource associated with the key.
See Also:
getString(String), MessageFormat.format(String, Object[])

getString

public String getString(String key,
                        Object[] substitutions,
                        boolean translate)
Returns a string resource associated with the key, and peforms substitutions.

Parameters:
key - the key of the string.
substitutions - the message substitutions.
translate - whether the result is to be translated to the current locale.
Returns:
a string resource associated with the key.
See Also:
getString(String), MessageFormat.format(String, Object[])

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.