public class XSDSimpleTypeDefinitionItemProvider extends XSDTypeDefinitionItemProvider
XSDSimpleTypeDefinition
object.XSDItemProviderAdapter.ItemPropertyDescriptorWithDefault
ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList<E>, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate
Adapter.Internal
itemDelegator, xsdFactory, xsdPackage
adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded
target
Constructor and Description |
---|
XSDSimpleTypeDefinitionItemProvider(AdapterFactory adapterFactory)
This constructs an instance from a factory and a notifier.
|
Modifier and Type | Method and Description |
---|---|
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(java.util.Collection<java.lang.Object> newChildDescriptors,
java.lang.Object object)
This adds
CommandParameter s describing the children
that can be created under this object. |
protected void |
createFinalPropertyDescriptor(java.lang.Object object) |
protected void |
createLexicalFinalPropertyDescriptor(java.lang.Object object) |
protected java.lang.String |
formFacetTypeName(java.lang.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() . |
java.util.Collection<? extends EStructuralFeature> |
getChildrenFeatures(java.lang.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<? extends org.eclipse.emf.common.command.Command>, org.eclipse.emf.edit.command.CommandParameter) . |
java.lang.Object |
getImage(java.lang.Object object)
This returns XSDSimpleTypeDefinition.gif.
|
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)
This implements
IItemLabelProvider.getText by simply calling toString on the argument. |
java.lang.String |
getText(java.lang.Object object,
boolean showType) |
void |
notifyChanged(Notification msg)
This handles notification by calling
fireNotifyChanged . |
createNamePropertyDescriptor, createTargetNamespacePropertyDescriptor
createElementPropertyDescriptor, createInitializeCopyCommand
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
addListener, adjustWrapperIndex, adjustWrapperIndices, adjustWrapperIndices, createAddCommand, createAddCommand, createChildParameter, createChildrenStore, createCommand, createCopyCommand, createCreateChildCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createDragAndDropCommand, createItemPropertyDescriptor, createItemPropertyDescriptor, createMoveCommand, createMoveCommand, createRemoveCommand, createRemoveCommand, createReplaceCommand, createReplaceCommand, createReplaceCommand, createSetCommand, createSetCommand, createWrapper, crop, dispose, disposeWrapper, disposeWrappers, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBackground, getBackground, getBaseURL, getChildFeature, getChildReference, getChildren, getChildrenReferences, getChildrenStore, getColumnImage, getColumnText, getEditableValue, getElements, getFeatureText, getFeatureValue, getFont, getFont, getForeground, getForeground, getImage, getNewChildDescriptors, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getRootAdapterFactory, getSetFeature, getSetFeatures, getString, getString, getString, getString, getString, getString, getString, getString, getStyledText, getTypeText, getTypeText, getUpdateableText, getValue, getWrappedValues, hasChildren, hasChildren, isAdapterForType, isEquivalentValue, isPropertySet, isResolveProxies, isValidValue, isWrappingNeeded, overlayImage, removeListener, resetPropertyValue, setPropertyValue, setTarget, shouldComposeCreationImage, shouldTranslate, unsetTarget, unwrap, unwrapCommandValues, updateChildren, wrap, wrapCommand
getTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCommand, getChildren, getNewChildDescriptors, getParent
getChildren, getParent, hasChildren
getElements
getEditableValue, getPropertyDescriptor
public XSDSimpleTypeDefinitionItemProvider(AdapterFactory adapterFactory)
public java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
getPropertyDescriptors
in interface IItemPropertySource
getPropertyDescriptors
in class XSDNamedComponentItemProvider
protected void createLexicalFinalPropertyDescriptor(java.lang.Object object)
protected void createFinalPropertyDescriptor(java.lang.Object object)
public java.util.Collection<? extends EStructuralFeature> getChildrenFeatures(java.lang.Object object)
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<? extends org.eclipse.emf.common.command.Command>, org.eclipse.emf.edit.command.CommandParameter)
.getChildrenFeatures
in class ItemProviderAdapter
public java.lang.Object getImage(java.lang.Object object)
getImage
in interface IItemLabelProvider
getImage
in class ItemProviderAdapter
public java.lang.String getText(java.lang.Object object)
ItemProviderAdapter
IItemLabelProvider.getText
by simply calling toString on the argument.
This will often be correct as is.getText
in interface IItemLabelProvider
getText
in class ItemProviderAdapter
public java.lang.String getText(java.lang.Object object, boolean showType)
public void notifyChanged(Notification msg)
fireNotifyChanged
.notifyChanged
in interface Adapter
notifyChanged
in class XSDNamedComponentItemProvider
msg
- a description of the change.protected void collectNewChildDescriptors(java.util.Collection<java.lang.Object> newChildDescriptors, java.lang.Object object)
CommandParameter
s describing 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
.collectNewChildDescriptors
in class ItemProviderAdapter
protected java.lang.String formFacetTypeName(java.lang.Object facetName)
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.protected boolean canAccomodateFacet(XSDSimpleTypeDefinition s, XSDConstrainingFacet f)
s
, can accomodate the given constraining facet,
f
, based on its existing facet children.