org.eclipse.weaver.extension.providers
Class WElementItemProvider

java.lang.Object
  extended byReflectiveItemProvider
      extended byorg.eclipse.weaver.extension.providers.WElementItemProvider
All Implemented Interfaces:
IWeaverItemProvider
Direct Known Subclasses:
XMIElementRefItemProvider

public class WElementItemProvider
extends ReflectiveItemProvider
implements IWeaverItemProvider

ItemProvider base extension

Since:
1.0
Author:
- Marcos Didonet Del Fabro (LINA Labs, INRIA team)
- Guillaume Gueltas (Sodifrance)
See Also:
Serialized Form

Constructor Summary
WElementItemProvider()
          This creates a base extension item provider
 
Method Summary
protected  void collectNewChildDescriptors(java.util.Collection newChildDescriptors, java.lang.Object object)
           
protected  java.util.List getAllConcreteSubclasses(EClass eClass)
          Gets all concrete subclasses of a class in all the packages of a resourceSet.
 java.util.Collection getChildren(java.lang.Object object)
           
protected  java.util.Collection getChildrenFeatures(java.lang.Object object)
           
 java.lang.Object getCreateChildImage(java.lang.Object owner, java.lang.Object feature, java.lang.Object child, java.util.Collection selection)
           
 java.lang.String getCreateChildText(java.lang.Object owner, java.lang.Object feature, java.lang.Object child, java.util.Collection selection)
           
 java.util.List getEElementPropertyDescriptors(java.lang.Object object)
          gets the properties of a gives object.
 java.util.Map getIconMap()
           
 java.lang.String getIconPath(java.lang.String element)
          Returns the icon associed to element or null if it doesn't exist
 java.lang.Object getImage(java.lang.Object object)
           
 java.util.List getPropertyDescriptors(java.lang.Object object)
          returns the descriptors for all properties of a given object.
 java.lang.String getText(java.lang.Object object)
           
 boolean isAdapterForType(java.lang.Object type)
          returns true if its factory is of type WElementProviderAdapterFactory
 void notifyChanged(Notification notification)
           
 void setAdapterFactory(AdapterFactory adapterFactory)
          Sets the adapter factory
 void setIconMap(java.util.Map icons)
          Sets the map of icons in the itemProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WElementItemProvider

public WElementItemProvider()
This creates a base extension item provider

Method Detail

setAdapterFactory

public void setAdapterFactory(AdapterFactory adapterFactory)
Description copied from interface: IWeaverItemProvider
Sets the adapter factory

Specified by:
setAdapterFactory in interface IWeaverItemProvider
Parameters:
adapterFactory -

setIconMap

public void setIconMap(java.util.Map icons)
Description copied from interface: IWeaverItemProvider
Sets the map of icons in the itemProvider

Specified by:
setIconMap in interface IWeaverItemProvider

getIconMap

public java.util.Map getIconMap()
Returns:
map of icons

getIconPath

public java.lang.String getIconPath(java.lang.String element)
Returns the icon associed to element or null if it doesn't exist

Returns:

getImage

public java.lang.Object getImage(java.lang.Object object)

getCreateChildImage

public java.lang.Object getCreateChildImage(java.lang.Object owner,
                                            java.lang.Object feature,
                                            java.lang.Object child,
                                            java.util.Collection selection)

getChildren

public java.util.Collection getChildren(java.lang.Object object)

collectNewChildDescriptors

protected void collectNewChildDescriptors(java.util.Collection newChildDescriptors,
                                          java.lang.Object object)

isAdapterForType

public boolean isAdapterForType(java.lang.Object type)
returns true if its factory is of type WElementProviderAdapterFactory

Parameters:
type -
Returns:

getAllConcreteSubclasses

protected java.util.List getAllConcreteSubclasses(EClass eClass)
Gets all concrete subclasses of a class in all the packages of a resourceSet.

Parameters:
eClass -
Returns:

getPropertyDescriptors

public java.util.List getPropertyDescriptors(java.lang.Object object)
returns the descriptors for all properties of a given object. It can modified to create a different editor for each property as needed

Parameters:
object -
Returns:

getEElementPropertyDescriptors

public java.util.List getEElementPropertyDescriptors(java.lang.Object object)
gets the properties of a gives object. Does a loop to get all structural features

Parameters:
object -
Returns:
a list

notifyChanged

public void notifyChanged(Notification notification)

getChildrenFeatures

protected java.util.Collection getChildrenFeatures(java.lang.Object object)

getCreateChildText

public java.lang.String getCreateChildText(java.lang.Object owner,
                                           java.lang.Object feature,
                                           java.lang.Object child,
                                           java.util.Collection selection)

getText

public java.lang.String getText(java.lang.Object object)