public class XcoreItemProviderAdapterFactory extends XcoreAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
fireNotifyChanged
.
The adapters also support Eclipse property sheets.
Note that most of the adapters are shared among multiple instances.
Modifier and Type | Field and Description |
---|---|
protected IChangeNotifier |
changeNotifier
This is used to implement
IChangeNotifier |
protected ComposedAdapterFactory |
parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory
|
protected java.util.Collection<java.lang.Object> |
supportedTypes
This keeps track of all the supported types checked by
isFactoryForType |
protected XAnnotationDirectiveItemProvider |
xAnnotationDirectiveItemProvider
This keeps track of the one adapter used for all
XAnnotationDirective instances |
protected XAnnotationItemProvider |
xAnnotationItemProvider
This keeps track of the one adapter used for all
XAnnotation instances |
protected XAttributeItemProvider |
xAttributeItemProvider
This keeps track of the one adapter used for all
XAttribute instances |
protected XClassItemProvider |
xClassItemProvider
This keeps track of the one adapter used for all
XClass instances |
protected XDataTypeItemProvider |
xDataTypeItemProvider
This keeps track of the one adapter used for all
XDataType instances |
protected XEnumItemProvider |
xEnumItemProvider
This keeps track of the one adapter used for all
XEnum instances |
protected XEnumLiteralItemProvider |
xEnumLiteralItemProvider
This keeps track of the one adapter used for all
XEnumLiteral instances |
protected XGenericTypeItemProvider |
xGenericTypeItemProvider
This keeps track of the one adapter used for all
XGenericType instances |
protected XImportDirectiveItemProvider |
xImportDirectiveItemProvider
This keeps track of the one adapter used for all
XImportDirective instances |
protected XOperationItemProvider |
xOperationItemProvider
This keeps track of the one adapter used for all
XOperation instances |
protected XPackageItemProvider |
xPackageItemProvider
This keeps track of the one adapter used for all
XPackage instances |
protected XParameterItemProvider |
xParameterItemProvider
This keeps track of the one adapter used for all
XParameter instances |
protected XReferenceItemProvider |
xReferenceItemProvider
This keeps track of the one adapter used for all
XReference instances |
protected XStringToStringMapEntryItemProvider |
xStringToStringMapEntryItemProvider
This keeps track of the one adapter used for all
Map.Entry instances |
protected XTypeParameterItemProvider |
xTypeParameterItemProvider
This keeps track of the one adapter used for all
XTypeParameter instances |
modelPackage, modelSwitch
Constructor and Description |
---|
XcoreItemProviderAdapterFactory()
This constructs an instance
|
Modifier and Type | Method and Description |
---|---|
Adapter |
adapt(Notifier notifier,
java.lang.Object type)
This implementation substitutes the factory itself as the key for the adapter
|
java.lang.Object |
adapt(java.lang.Object object,
java.lang.Object type) |
void |
addListener(INotifyChangedListener notifyChangedListener)
This adds a listener
|
Adapter |
createXAnnotationAdapter()
This creates an adapter for a
XAnnotation |
Adapter |
createXAnnotationDirectiveAdapter()
This creates an adapter for a
XAnnotationDirective |
Adapter |
createXAttributeAdapter()
This creates an adapter for a
XAttribute |
Adapter |
createXClassAdapter()
This creates an adapter for a
XClass |
Adapter |
createXDataTypeAdapter()
This creates an adapter for a
XDataType |
Adapter |
createXEnumAdapter()
This creates an adapter for a
XEnum |
Adapter |
createXEnumLiteralAdapter()
This creates an adapter for a
XEnumLiteral |
Adapter |
createXGenericTypeAdapter()
This creates an adapter for a
XGenericType |
Adapter |
createXImportDirectiveAdapter()
This creates an adapter for a
XImportDirective |
Adapter |
createXOperationAdapter()
This creates an adapter for a
XOperation |
Adapter |
createXPackageAdapter()
This creates an adapter for a
XPackage |
Adapter |
createXParameterAdapter()
This creates an adapter for a
XParameter |
Adapter |
createXReferenceAdapter()
This creates an adapter for a
XReference |
Adapter |
createXStringToStringMapEntryAdapter()
This creates an adapter for a
Map.Entry |
Adapter |
createXTypeParameterAdapter()
This creates an adapter for a
XTypeParameter |
void |
dispose()
This disposes all of the item providers created by this factory
|
void |
fireNotifyChanged(Notification notification)
This delegates to
changeNotifier and to parentAdapterFactory |
ComposeableAdapterFactory |
getRootAdapterFactory()
This returns the root adapter factory that contains this factory
|
boolean |
isFactoryForType(java.lang.Object type) |
void |
removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener
|
void |
setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the composed adapter factory that contains this factory
|
createAdapter, createEObjectAdapter, createXClassifierAdapter, createXMemberAdapter, createXModelElementAdapter, createXNamedElementAdapter, createXStructuralFeatureAdapter, createXTypedElementAdapter
adaptAllNew, adaptNew, associate, createAdapter, resolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adaptAllNew, adaptNew
protected ComposedAdapterFactory parentAdapterFactory
protected IChangeNotifier changeNotifier
IChangeNotifier
.
protected java.util.Collection<java.lang.Object> supportedTypes
isFactoryForType
.
protected XAnnotationItemProvider xAnnotationItemProvider
XAnnotation
instances.
protected XAnnotationDirectiveItemProvider xAnnotationDirectiveItemProvider
XAnnotationDirective
instances.
protected XAttributeItemProvider xAttributeItemProvider
XAttribute
instances.
protected XClassItemProvider xClassItemProvider
XClass
instances.
protected XDataTypeItemProvider xDataTypeItemProvider
XDataType
instances.
protected XEnumItemProvider xEnumItemProvider
XEnum
instances.
protected XEnumLiteralItemProvider xEnumLiteralItemProvider
XEnumLiteral
instances.
protected XGenericTypeItemProvider xGenericTypeItemProvider
XGenericType
instances.
protected XImportDirectiveItemProvider xImportDirectiveItemProvider
XImportDirective
instances.
protected XOperationItemProvider xOperationItemProvider
XOperation
instances.
protected XPackageItemProvider xPackageItemProvider
XPackage
instances.
protected XParameterItemProvider xParameterItemProvider
XParameter
instances.
protected XReferenceItemProvider xReferenceItemProvider
XReference
instances.
protected XStringToStringMapEntryItemProvider xStringToStringMapEntryItemProvider
Map.Entry
instances.
protected XTypeParameterItemProvider xTypeParameterItemProvider
XTypeParameter
instances.
public XcoreItemProviderAdapterFactory()
public Adapter createXAnnotationAdapter()
XAnnotation
.
createXAnnotationAdapter
in class XcoreAdapterFactory
XAnnotation
public Adapter createXAnnotationDirectiveAdapter()
XAnnotationDirective
.
createXAnnotationDirectiveAdapter
in class XcoreAdapterFactory
XAnnotationDirective
public Adapter createXAttributeAdapter()
XAttribute
.
createXAttributeAdapter
in class XcoreAdapterFactory
XAttribute
public Adapter createXClassAdapter()
XClass
.
createXClassAdapter
in class XcoreAdapterFactory
XClass
public Adapter createXDataTypeAdapter()
XDataType
.
createXDataTypeAdapter
in class XcoreAdapterFactory
XDataType
public Adapter createXEnumAdapter()
XEnum
.
createXEnumAdapter
in class XcoreAdapterFactory
XEnum
public Adapter createXEnumLiteralAdapter()
XEnumLiteral
.
createXEnumLiteralAdapter
in class XcoreAdapterFactory
XEnumLiteral
public Adapter createXGenericTypeAdapter()
XGenericType
.
createXGenericTypeAdapter
in class XcoreAdapterFactory
XGenericType
public Adapter createXImportDirectiveAdapter()
XImportDirective
.
createXImportDirectiveAdapter
in class XcoreAdapterFactory
XImportDirective
public Adapter createXOperationAdapter()
XOperation
.
createXOperationAdapter
in class XcoreAdapterFactory
XOperation
public Adapter createXPackageAdapter()
XPackage
.
createXPackageAdapter
in class XcoreAdapterFactory
XPackage
public Adapter createXParameterAdapter()
XParameter
.
createXParameterAdapter
in class XcoreAdapterFactory
XParameter
public Adapter createXReferenceAdapter()
XReference
.
createXReferenceAdapter
in class XcoreAdapterFactory
XReference
public Adapter createXStringToStringMapEntryAdapter()
Map.Entry
.
createXStringToStringMapEntryAdapter
in class XcoreAdapterFactory
Map.Entry
public Adapter createXTypeParameterAdapter()
XTypeParameter
.
createXTypeParameterAdapter
in class XcoreAdapterFactory
XTypeParameter
public ComposeableAdapterFactory getRootAdapterFactory()
getRootAdapterFactory
in interface ComposeableAdapterFactory
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
setParentAdapterFactory
in interface ComposeableAdapterFactory
public boolean isFactoryForType(java.lang.Object type)
isFactoryForType
in interface AdapterFactory
isFactoryForType
in class XcoreAdapterFactory
type
- the key indicating the type of adapter in question.Adapter.isAdapterForType(java.lang.Object)
public Adapter adapt(Notifier notifier, java.lang.Object type)
adapt
in interface AdapterFactory
adapt
in class AdapterFactoryImpl
notifier
- the notifier to adapt.type
- the key indicating the type of adapter required.null
otherwise.Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
public java.lang.Object adapt(java.lang.Object object, java.lang.Object type)
adapt
in interface AdapterFactory
adapt
in class AdapterFactoryImpl
object
- arbitrary object to adapt.type
- the key indicating the type of adapter required.AdapterFactoryImpl.adapt(Notifier,Object)
,
AdapterFactoryImpl.resolve(Object, Object)
public void addListener(INotifyChangedListener notifyChangedListener)
addListener
in interface IChangeNotifier
public void removeListener(INotifyChangedListener notifyChangedListener)
removeListener
in interface IChangeNotifier
public void fireNotifyChanged(Notification notification)
changeNotifier
and to parentAdapterFactory
.
fireNotifyChanged
in interface IChangeNotifier
public void dispose()
dispose
in interface IDisposable