org.eclipse.xsd.provider
Class XSDParticleItemProvider

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.emf.edit.provider.ItemProviderAdapter
          extended by org.eclipse.xsd.provider.XSDItemProviderAdapter
              extended by org.eclipse.xsd.provider.XSDConcreteComponentItemProvider
                  extended by org.eclipse.xsd.provider.XSDComponentItemProvider
                      extended by org.eclipse.xsd.provider.XSDComplexTypeContentItemProvider
                          extended by org.eclipse.xsd.provider.XSDParticleItemProvider
All Implemented Interfaces:
Adapter, Adapter.Internal, ResourceLocator, CreateChildCommand.Helper, IChangeNotifier, IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider

public class XSDParticleItemProvider
extends XSDComplexTypeContentItemProvider
implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource

This is the item provider adpater for a XSDParticle object.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter
XSDItemProviderAdapter.ItemPropertyDescriptorWithDefault
 
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList<E>, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
 
Field Summary
 
Fields inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter
itemDelegator, xsdFactory, xsdPackage
 
Fields inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
XSDParticleItemProvider(AdapterFactory adapterFactory)
          This constructs an instance from a factory and a notifier.
 
Method Summary
 Command createCommand(java.lang.Object object, EditingDomain domain, java.lang.Class<? extends Command> commandClass, CommandParameter commandParameter)
          This returns Remove and CreateChild commands (at least) that are based on the attributeUse content, not the attributeUse itself.
 java.util.Collection<?> getChildren(java.lang.Object object)
           
 java.util.Collection<? extends EStructuralFeature> getChildrenFeatures(java.lang.Object object)
          This specifies how to implement getChildren(java.lang.Object) and is used to deduce an appropriate feature for an AddCommand, RemoveCommand or MoveCommand in createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter).
protected  XSDParticleContent getDelegate(XSDParticle xsdParticle)
           
 java.lang.Object getImage(java.lang.Object object)
          This returns XSDParticle.gif.
 java.util.Collection<?> getNewChildDescriptors(java.lang.Object object, EditingDomain domain, java.lang.Object sibling)
          This returns a list of child descriptors based on the particle content, not the particle itself.
 java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
          This returns the property descriptors for the adapted class.
 java.lang.String getText(java.lang.Object object)
           
 boolean hasChildren(java.lang.Object object)
           
 void notifyChanged(Notification msg)
          This handles notification by calling fireNotifyChanged.
 
Methods inherited from class org.eclipse.xsd.provider.XSDConcreteComponentItemProvider
createElementPropertyDescriptor, createInitializeCopyCommand
 
Methods inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter
addModelGroupChildParameters, addSimpleTypeDefinitionChildParameters, createAttributeDeclaration, createAttributeGroupDefinition, createAttributeGroupDefinitionReference, createAttributeUse, createChildParameter, createComplexTypeDefinition, createElementDeclaration, createIdentityConstraintDefinition, createModelGroupDefinition, createNotationDeclaration, createParticle, createSimpleTypeDefinition, getAttributeSiblings, getCreateChildDescription, getCreateChildImage, getCreateChildResult, getCreateChildText, getCreateChildToolTipText, getImageNameQualifier, getNewObjectName, getParent, getParticleOrAttributeUseContent, getTopModelGroup, getTypeText, getTypeTextQualifier, isGlobal, isUniqueAttributeDeclarationName, isUniqueElementDeclarationName
 
Methods inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
addListener, adjustWrapperIndex, adjustWrapperIndices, adjustWrapperIndices, collectNewChildDescriptors, createAddCommand, createAddCommand, createChildParameter, createChildrenStore, createCopyCommand, createCreateChildCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createItemPropertyDescriptor, createItemPropertyDescriptor, createMoveCommand, createMoveCommand, createRemoveCommand, createRemoveCommand, createReplaceCommand, createReplaceCommand, createSetCommand, createSetCommand, createWrapper, crop, dispose, disposeWrapper, disposeWrappers, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBaseURL, getChildFeature, getChildReference, getChildrenReferences, getChildrenStore, getEditableValue, getElements, getFeatureText, getFeatureValue, getImage, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getRootAdapterFactory, getSetFeature, getSetFeatures, getString, getString, getString, getString, getString, getString, getString, getString, getTypeText, getTypeText, getUpdateableText, getWrappedValues, isAdapterForType, isEquivalentValue, isPropertySet, isWrappingNeeded, overlayImage, removeListener, resetPropertyValue, setPropertyValue, setTarget, shouldTranslate, unsetTarget, unwrap, unwrapCommandValues, updateChildren, wrap, wrapCommand
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget
 
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.edit.provider.IEditingDomainItemProvider
getParent
 
Methods inherited from interface org.eclipse.emf.edit.provider.ITreeItemContentProvider
getParent
 
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource
getEditableValue, getPropertyDescriptor
 

Constructor Detail

XSDParticleItemProvider

public XSDParticleItemProvider(AdapterFactory adapterFactory)
This constructs an instance from a factory and a notifier.

Method Detail

getDelegate

protected XSDParticleContent getDelegate(XSDParticle xsdParticle)

getPropertyDescriptors

public java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
This returns the property descriptors for the adapted class.

Specified by:
getPropertyDescriptors in interface IItemPropertySource
Overrides:
getPropertyDescriptors in class XSDComplexTypeContentItemProvider

getChildrenFeatures

public java.util.Collection<? extends EStructuralFeature> getChildrenFeatures(java.lang.Object object)
This specifies how to implement getChildren(java.lang.Object) and is used to deduce an appropriate feature for an AddCommand, RemoveCommand or MoveCommand in createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter).

Overrides:
getChildrenFeatures in class ItemProviderAdapter

getChildren

public java.util.Collection<?> getChildren(java.lang.Object object)
Specified by:
getChildren in interface IEditingDomainItemProvider
Specified by:
getChildren in interface ITreeItemContentProvider
Overrides:
getChildren in class ItemProviderAdapter

hasChildren

public boolean hasChildren(java.lang.Object object)
Specified by:
hasChildren in interface ITreeItemContentProvider
Overrides:
hasChildren in class ItemProviderAdapter

getImage

public java.lang.Object getImage(java.lang.Object object)
This returns XSDParticle.gif.

Specified by:
getImage in interface IItemLabelProvider
Overrides:
getImage in class ItemProviderAdapter

getText

public java.lang.String getText(java.lang.Object object)
Specified by:
getText in interface IItemLabelProvider
Overrides:
getText in class ItemProviderAdapter

notifyChanged

public void notifyChanged(Notification msg)
This handles notification by calling fireNotifyChanged.

Specified by:
notifyChanged in interface Adapter
Overrides:
notifyChanged in class XSDComplexTypeContentItemProvider

getNewChildDescriptors

public java.util.Collection<?> getNewChildDescriptors(java.lang.Object object,
                                                      EditingDomain domain,
                                                      java.lang.Object sibling)
This returns a list of child descriptors based on the particle content, not the particle itself.

Specified by:
getNewChildDescriptors in interface IEditingDomainItemProvider
Overrides:
getNewChildDescriptors in class ItemProviderAdapter

createCommand

public Command createCommand(java.lang.Object object,
                             EditingDomain domain,
                             java.lang.Class<? extends Command> commandClass,
                             CommandParameter commandParameter)
This returns Remove and CreateChild commands (at least) that are based on the attributeUse content, not the attributeUse itself.

Specified by:
createCommand in interface IEditingDomainItemProvider
Overrides:
createCommand in class ItemProviderAdapter

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