org.eclipse.emf.ecore.xcore.provider
Class XcoreItemProviderAdapterFactory

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
      extended by org.eclipse.emf.ecore.xcore.util.XcoreAdapterFactory
          extended by org.eclipse.emf.ecore.xcore.provider.XcoreItemProviderAdapterFactory
All Implemented Interfaces:
AdapterFactory, ComposeableAdapterFactory, IChangeNotifier, IDisposable

public class XcoreItemProviderAdapterFactory
extends XcoreAdapterFactory
implements ComposeableAdapterFactory, IChangeNotifier, IDisposable

This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this factory convert EMF adapter notifications into calls to fireNotifyChanged. The adapters also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances.


Field Summary
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
 
Fields inherited from class org.eclipse.emf.ecore.xcore.util.XcoreAdapterFactory
modelPackage, modelSwitch
 
Constructor Summary
XcoreItemProviderAdapterFactory()
          This constructs an instance
 
Method Summary
 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
 
Methods inherited from class org.eclipse.emf.ecore.xcore.util.XcoreAdapterFactory
createAdapter, createEObjectAdapter, createXClassifierAdapter, createXMemberAdapter, createXModelElementAdapter, createXNamedElementAdapter, createXStructuralFeatureAdapter, createXTypedElementAdapter
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
adaptAllNew, adaptNew, associate, createAdapter, resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.notify.AdapterFactory
adaptAllNew, adaptNew
 

Field Detail

parentAdapterFactory

protected ComposedAdapterFactory parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory.


changeNotifier

protected IChangeNotifier changeNotifier
This is used to implement IChangeNotifier.


supportedTypes

protected java.util.Collection<java.lang.Object> supportedTypes
This keeps track of all the supported types checked by isFactoryForType.


xAnnotationItemProvider

protected XAnnotationItemProvider xAnnotationItemProvider
This keeps track of the one adapter used for all XAnnotation instances.


xAnnotationDirectiveItemProvider

protected XAnnotationDirectiveItemProvider xAnnotationDirectiveItemProvider
This keeps track of the one adapter used for all XAnnotationDirective instances.


xAttributeItemProvider

protected XAttributeItemProvider xAttributeItemProvider
This keeps track of the one adapter used for all XAttribute instances.


xClassItemProvider

protected XClassItemProvider xClassItemProvider
This keeps track of the one adapter used for all XClass instances.


xDataTypeItemProvider

protected XDataTypeItemProvider xDataTypeItemProvider
This keeps track of the one adapter used for all XDataType instances.


xEnumItemProvider

protected XEnumItemProvider xEnumItemProvider
This keeps track of the one adapter used for all XEnum instances.


xEnumLiteralItemProvider

protected XEnumLiteralItemProvider xEnumLiteralItemProvider
This keeps track of the one adapter used for all XEnumLiteral instances.


xGenericTypeItemProvider

protected XGenericTypeItemProvider xGenericTypeItemProvider
This keeps track of the one adapter used for all XGenericType instances.


xImportDirectiveItemProvider

protected XImportDirectiveItemProvider xImportDirectiveItemProvider
This keeps track of the one adapter used for all XImportDirective instances.


xOperationItemProvider

protected XOperationItemProvider xOperationItemProvider
This keeps track of the one adapter used for all XOperation instances.


xPackageItemProvider

protected XPackageItemProvider xPackageItemProvider
This keeps track of the one adapter used for all XPackage instances.


xParameterItemProvider

protected XParameterItemProvider xParameterItemProvider
This keeps track of the one adapter used for all XParameter instances.


xReferenceItemProvider

protected XReferenceItemProvider xReferenceItemProvider
This keeps track of the one adapter used for all XReference instances.


xStringToStringMapEntryItemProvider

protected XStringToStringMapEntryItemProvider xStringToStringMapEntryItemProvider
This keeps track of the one adapter used for all Map.Entry instances.


xTypeParameterItemProvider

protected XTypeParameterItemProvider xTypeParameterItemProvider
This keeps track of the one adapter used for all XTypeParameter instances.

Constructor Detail

XcoreItemProviderAdapterFactory

public XcoreItemProviderAdapterFactory()
This constructs an instance.

Method Detail

createXAnnotationAdapter

public Adapter createXAnnotationAdapter()
This creates an adapter for a XAnnotation.

Overrides:
createXAnnotationAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XAnnotation

createXAnnotationDirectiveAdapter

public Adapter createXAnnotationDirectiveAdapter()
This creates an adapter for a XAnnotationDirective.

Overrides:
createXAnnotationDirectiveAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XAnnotationDirective

createXAttributeAdapter

public Adapter createXAttributeAdapter()
This creates an adapter for a XAttribute.

Overrides:
createXAttributeAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XAttribute

createXClassAdapter

public Adapter createXClassAdapter()
This creates an adapter for a XClass.

Overrides:
createXClassAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XClass

createXDataTypeAdapter

public Adapter createXDataTypeAdapter()
This creates an adapter for a XDataType.

Overrides:
createXDataTypeAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XDataType

createXEnumAdapter

public Adapter createXEnumAdapter()
This creates an adapter for a XEnum.

Overrides:
createXEnumAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XEnum

createXEnumLiteralAdapter

public Adapter createXEnumLiteralAdapter()
This creates an adapter for a XEnumLiteral.

Overrides:
createXEnumLiteralAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XEnumLiteral

createXGenericTypeAdapter

public Adapter createXGenericTypeAdapter()
This creates an adapter for a XGenericType.

Overrides:
createXGenericTypeAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XGenericType

createXImportDirectiveAdapter

public Adapter createXImportDirectiveAdapter()
This creates an adapter for a XImportDirective.

Overrides:
createXImportDirectiveAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XImportDirective

createXOperationAdapter

public Adapter createXOperationAdapter()
This creates an adapter for a XOperation.

Overrides:
createXOperationAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XOperation

createXPackageAdapter

public Adapter createXPackageAdapter()
This creates an adapter for a XPackage.

Overrides:
createXPackageAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XPackage

createXParameterAdapter

public Adapter createXParameterAdapter()
This creates an adapter for a XParameter.

Overrides:
createXParameterAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XParameter

createXReferenceAdapter

public Adapter createXReferenceAdapter()
This creates an adapter for a XReference.

Overrides:
createXReferenceAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XReference

createXStringToStringMapEntryAdapter

public Adapter createXStringToStringMapEntryAdapter()
This creates an adapter for a Map.Entry.

Overrides:
createXStringToStringMapEntryAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
Map.Entry

createXTypeParameterAdapter

public Adapter createXTypeParameterAdapter()
This creates an adapter for a XTypeParameter.

Overrides:
createXTypeParameterAdapter in class XcoreAdapterFactory
Returns:
the new adapter.
See Also:
XTypeParameter

getRootAdapterFactory

public ComposeableAdapterFactory getRootAdapterFactory()
This returns the root adapter factory that contains this factory.

Specified by:
getRootAdapterFactory in interface ComposeableAdapterFactory

setParentAdapterFactory

public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the composed adapter factory that contains this factory.

Specified by:
setParentAdapterFactory in interface ComposeableAdapterFactory

isFactoryForType

public boolean isFactoryForType(java.lang.Object type)

Specified by:
isFactoryForType in interface AdapterFactory
Overrides:
isFactoryForType in class XcoreAdapterFactory
Parameters:
type - the key indicating the type of adapter in question.
Returns:
whether this factory is applicable for the type of the object.
See Also:
Adapter.isAdapterForType(java.lang.Object)

adapt

public Adapter adapt(Notifier notifier,
                     java.lang.Object type)
This implementation substitutes the factory itself as the key for the adapter.

Specified by:
adapt in interface AdapterFactory
Overrides:
adapt in class AdapterFactoryImpl
Parameters:
notifier - the notifier to adapt.
type - the key indicating the type of adapter required.
Returns:
a previously existing associated adapter, a new associated adapter if possible, or null otherwise.
See Also:
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier), AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)

adapt

public java.lang.Object adapt(java.lang.Object object,
                              java.lang.Object type)

Specified by:
adapt in interface AdapterFactory
Overrides:
adapt in class AdapterFactoryImpl
Parameters:
object - arbitrary object to adapt.
type - the key indicating the type of adapter required.
Returns:
either an associated adapter or the object itself.
See Also:
AdapterFactoryImpl.adapt(Notifier,Object), AdapterFactoryImpl.resolve(Object, Object)

addListener

public void addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.

Specified by:
addListener in interface IChangeNotifier

removeListener

public void removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.

Specified by:
removeListener in interface IChangeNotifier

fireNotifyChanged

public void fireNotifyChanged(Notification notification)
This delegates to changeNotifier and to parentAdapterFactory.

Specified by:
fireNotifyChanged in interface IChangeNotifier

dispose

public void dispose()
This disposes all of the item providers created by this factory.

Specified by:
dispose in interface IDisposable

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