org.eclipse.xsd.provider
Class XSDSimpleTypeDefinitionItemProvider
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.edit.provider.ItemProviderAdapter
org.eclipse.xsd.provider.XSDItemProviderAdapter
org.eclipse.xsd.provider.XSDConcreteComponentItemProvider
org.eclipse.xsd.provider.XSDComponentItemProvider
org.eclipse.xsd.provider.XSDNamedComponentItemProvider
org.eclipse.xsd.provider.XSDRedefinableComponentItemProvider
org.eclipse.xsd.provider.XSDTypeDefinitionItemProvider
org.eclipse.xsd.provider.XSDSimpleTypeDefinitionItemProvider
- All Implemented Interfaces:
- Adapter, Adapter.Internal, CreateChildCommand.Helper, IChangeNotifier, IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider, ResourceLocator
- public class XSDSimpleTypeDefinitionItemProvider
- extends XSDTypeDefinitionItemProvider
This is the item provider adpater for a XSDSimpleTypeDefinition
object.
Method Summary |
protected boolean |
canAccomodateFacet(XSDSimpleTypeDefinition s,
XSDConstrainingFacet f)
This tests whether the specified simple type definition,
s , can accomodate the given constraining facet,
f , based on its existing facet children. |
protected void |
collectNewChildDescriptors(Collection newChildDescriptors,
Object object)
This adds to the collection of CommandParameter s
describing all of the children that can be created under this object.
|
protected void |
createFinalPropertyDescriptor(Object object)
|
protected void |
createLexicalFinalPropertyDescriptor(Object object)
|
protected String |
formFacetTypeName(Object facetName)
This forms the name for a facet MOF type, from the string (with
Object static type) obtained from the collection returned
by XSDSimpleTypeDefinition.getValidFacets() . |
Collection |
getChildrenFeatures(Object object)
This specifies how to implement ItemProviderAdapter.getChildren(java.lang.Object) and is used to deduce an appropriate feature for an
AddCommand , RemoveCommand or
MoveCommand in ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter) . |
Object |
getImage(Object object)
This returns XSDSimpleTypeDefinition.gif. |
List |
getPropertyDescriptors(Object object)
This returns the property descriptors for the adapted class. |
String |
getText(Object object)
|
String |
getText(Object object,
boolean showType)
|
void |
notifyChanged(Notification msg)
This handles notification by calling fireNotifyChanged . |
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, createAddCommand, createAddCommand, createChildParameter, createChildrenStore, createCommand, 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, getChildren, getChildrenReferences, getChildrenStore, getEditableValue, getElements, getFeatureText, getFeatureValue, getImage, getNewChildDescriptors, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getRootAdapterFactory, getSetFeature, getSetFeatures, getString, getString, getString, getString, getString, getString, getString, getString, getTypeText, getTypeText, getUpdateableText, getWrappedValues, hasChildren, isAdapterForType, isEquivalentValue, isPropertySet, isWrappingNeeded, overlayImage, removeListener, resetPropertyValue, setPropertyValue, setTarget, shouldTranslate, unsetTarget, unwrap, unwrapCommandValues, updateChildren, wrap, wrapCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSDSimpleTypeDefinitionItemProvider
public XSDSimpleTypeDefinitionItemProvider(AdapterFactory adapterFactory)
- This constructs an instance from a factory and a notifier.
getPropertyDescriptors
public List getPropertyDescriptors(Object object)
- This returns the property descriptors for the adapted class.
- Specified by:
getPropertyDescriptors
in interface IItemPropertySource
- Overrides:
getPropertyDescriptors
in class XSDNamedComponentItemProvider
createLexicalFinalPropertyDescriptor
protected void createLexicalFinalPropertyDescriptor(Object object)
createFinalPropertyDescriptor
protected void createFinalPropertyDescriptor(Object object)
getChildrenFeatures
public Collection getChildrenFeatures(Object object)
- This specifies how to implement
ItemProviderAdapter.getChildren(java.lang.Object)
and is used to deduce an appropriate feature for an
AddCommand
, RemoveCommand
or
MoveCommand
in ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter)
.
getImage
public Object getImage(Object object)
- This returns XSDSimpleTypeDefinition.gif.
getText
public String getText(Object object)
getText
public String getText(Object object,
boolean showType)
notifyChanged
public void notifyChanged(Notification msg)
- This handles notification by calling
fireNotifyChanged
.
- Specified by:
notifyChanged
in interface Adapter
- Overrides:
notifyChanged
in class XSDNamedComponentItemProvider
collectNewChildDescriptors
protected void collectNewChildDescriptors(Collection newChildDescriptors,
Object object)
- This adds to the collection of
CommandParameter
s
describing all of the children that can be created under this object.
The allowable simple type definition and facet children depend upon the
variety and (if atomic) the primitive type of this simple type definition,
as well as upon its existing children. For an option to be displayed, but
disabled, CommandParameter.feature
is null
.
formFacetTypeName
protected String formFacetTypeName(Object facetName)
- This forms the name for a facet MOF type, from the string (with
Object
static type) obtained from the collection returned
by XSDSimpleTypeDefinition.getValidFacets()
. The object is
cast to a String
, the first character is capitalized,
"XSD" is prepended, and "Facet" appended.
canAccomodateFacet
protected boolean canAccomodateFacet(XSDSimpleTypeDefinition s,
XSDConstrainingFacet f)
- This tests whether the specified simple type definition,
s
, can accomodate the given constraining facet,
f
, based on its existing facet children.