|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.compare.util.AdapterUtils
public final class AdapterUtils
Useful methods for EMF adapter factories handling.
Method Summary | ||
---|---|---|
static
|
adapt(org.eclipse.emf.ecore.EObject eObj,
java.lang.Class<? extends T> type)
This will try and return an adapter of the given type associated to the given EObject. |
|
static org.eclipse.emf.common.notify.AdapterFactory |
getAdapterFactory()
Returns a factory built with all the AdapterFactory instances available in the global registry. |
|
static java.lang.Object |
getItemProviderImage(org.eclipse.emf.ecore.EObject eObj)
This will try and get the IItemLabelProvider associated to the given EObject if its ItemProviderFactory is registered, then return the image it provides. |
|
static java.lang.String |
getItemProviderText(org.eclipse.emf.ecore.EObject eObj)
This will try and get the IItemLabelProvider associated to the given EObject if its ItemProviderFactory is registered, then return the text it provides. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T adapt(org.eclipse.emf.ecore.EObject eObj, java.lang.Class<? extends T> type)
T
- Type of the adapter to return.eObj
- The EObject we seek an adapter for.type
- The sought adapter's type.
AdapterFactory.adapt(Object, Object)
public static org.eclipse.emf.common.notify.AdapterFactory getAdapterFactory()
AdapterFactory
instances available in the global registry.
AdapterFactory
instances available in the global registry.public static java.lang.Object getItemProviderImage(org.eclipse.emf.ecore.EObject eObj)
eObj
- EObject we need an image for.
null
if it cannot be found.IItemLabelProvider.getImage(Object)
public static java.lang.String getItemProviderText(org.eclipse.emf.ecore.EObject eObj)
eObj
- EObject we need the text of.
null
if
it cannot be found.IItemLabelProvider.getText(Object)
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |