## org.eclipse.emf.ecoretools.diagram.edit.policies
Class EcoreBaseItemSemanticEditPolicy

    java.lang.Object
      org.eclipse.gef.editpolicies.AbstractEditPolicy
          org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy
              org.eclipse.emf.ecoretools.diagram.edit.policies.EcoreBaseItemSemanticEditPolicy

All Implemented Interfaces:
  org.eclipse.gef.EditPolicy, org.eclipse.gef.RequestConstants

Direct Known Subclasses:
  EAnnotationDetailsItemSemanticEditPolicy, EAnnotationItemSemanticEditPolicy, EAnnotationReferencesItemSemanticEditPolicy, EAttributeItemSemanticEditPolicy, EClass2ItemSemanticEditPolicy, EClassAttributes2ItemSemanticEditPolicy, EClassAttributesItemSemanticEditPolicy, EClassESuperTypesItemSemanticEditPolicy, EClassItemSemanticEditPolicy, EClassOperations2ItemSemanticEditPolicy, EClassOperationsItemSemanticEditPolicy, EDataType2ItemSemanticEditPolicy, EDataTypeItemSemanticEditPolicy, EEnum2ItemSemanticEditPolicy, EEnumItemSemanticEditPolicy, EEnumLiteralItemSemanticEditPolicy, EEnumLiterals2ItemSemanticEditPolicy, EEnumLiteralsItemSemanticEditPolicy, EOperationItemSemanticEditPolicy, EPackage2ItemSemanticEditPolicy, EPackageContentsItemSemanticEditPolicy, EPackageItemSemanticEditPolicy, EReferenceItemSemanticEditPolicy, EStringToStringMapEntryItemSemanticEditPolicy

    public class EcoreBaseItemSemanticEditPolicy

extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy

Nested Class Summary
`static class` `EcoreBaseItemSemanticEditPolicy.LinkConstraints`

Field Summary
`static java.lang.String` `VISUAL_ID_KEY` Extended request data key to hold editpart visual id.

Fields inherited from interface org.eclipse.gef.EditPolicy
`COMPONENT_ROLE, CONNECTION_BENDPOINTS_ROLE, CONNECTION_ENDPOINTS_ROLE, CONNECTION_ROLE, CONTAINER_ROLE, DIRECT_EDIT_ROLE, GRAPHICAL_NODE_ROLE, LAYOUT_ROLE, NODE_ROLE, PRIMARY_DRAG_ROLE, SELECTION_FEEDBACK_ROLE, TREE_CONTAINER_ROLE`

Fields inherited from interface org.eclipse.gef.RequestConstants
`REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER`

Constructor Summary
`protected` `EcoreBaseItemSemanticEditPolicy(org.eclipse.gmf.runtime.emf.type.core.IElementType elementType)`

Method Summary
`protected org.eclipse.gef.commands.Command` `addDeleteViewCommand(org.eclipse.gef.commands.Command mainCommand, org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest completedRequest)`
`protected void` `addDestroyShortcutsCommand(org.eclipse.gef.commands.CompoundCommand command)`
`org.eclipse.gef.commands.Command` `getCommand(org.eclipse.gef.Request request)` Extended request data key to hold editpart visual id.
`protected org.eclipse.gef.commands.Command` `getConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest req)`
`protected org.eclipse.gef.commands.Command` `getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req)`
`protected org.eclipse.gef.commands.Command` `getCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req)`
`protected org.eclipse.gef.commands.CompoundCommand` `getDestroyEdgesCommand()` Creates commands to destroy all host incoming and outgoing links.
`protected org.eclipse.gef.commands.Command` `getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req)`
`protected org.eclipse.gef.commands.Command` `getDestroyElementCommand(org.eclipse.gmf.runtime.notation.View view)` Creates command to destroy the link.
`protected org.eclipse.gef.commands.Command` `getDestroyReferenceCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req)`
`protected org.eclipse.gef.commands.Command` `getDuplicateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req)`
`protected org.eclipse.gef.commands.Command` `getEditContextCommand(org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest req)`
`protected org.eclipse.emf.transaction.TransactionalEditingDomain` `getEditingDomain()` Returns editing domain from the host edit part.
`protected org.eclipse.gef.commands.Command` `getGEFWrapper(org.eclipse.gmf.runtime.common.core.command.ICommand cmd)`
`protected org.eclipse.gef.commands.Command` `getMoveCommand(org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest req)`
`protected org.eclipse.gef.commands.Command` `getMSLWrapper(org.eclipse.gmf.runtime.common.core.command.ICommand cmd)` Deprecated. use getGEFWrapper() instead
`protected org.eclipse.gef.commands.Command` `getReorientReferenceRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest req)`
`protected org.eclipse.gef.commands.Command` `getReorientRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest req)`
`protected org.eclipse.gef.commands.Command` `getSemanticCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request)`
`protected org.eclipse.gef.commands.Command` `getSemanticCommandSwitch(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req)`
`protected org.eclipse.emf.ecore.EObject` `getSemanticElement()`
`protected org.eclipse.gef.commands.Command` `getSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest req)`
`protected int` `getVisualID(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request)` Returns visual id from request parameters.

Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy
`completeRequest, getReorientRefRelationshipSourceCommand, getReorientRefRelationshipTargetCommand, getReorientRelationshipSourceCommand, getReorientRelationshipTargetCommand, getTargetEditPart, shouldProceed, understandsRequest`

Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy
`activate, deactivate, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getHost, setHost, showSourceFeedback, showTargetFeedback, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### VISUAL_ID_KEY

    public static final java.lang.String VISUAL_ID_KEY

  Extended request data key to hold editpart visual id.

  See Also:
    Constant Field Values

Constructor Detail

### EcoreBaseItemSemanticEditPolicy

    protected EcoreBaseItemSemanticEditPolicy(org.eclipse.gmf.runtime.emf.type.core.IElementType elementType)

Method Detail

### getCommand

    public org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)

  Extended request data key to hold editpart visual id. Add visual id of edited editpart to extended data of the request so command switch can decide what kind of diagram element is being edited. It is done in those cases when it's not possible to deduce diagram element kind from domain element.

  Specified by:
    `getCommand` in interface `org.eclipse.gef.EditPolicy`
  Overrides:
    `getCommand` in class `org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy`

### getVisualID

    protected int getVisualID(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request)

  Returns visual id from request parameters.

### getSemanticCommand

    protected org.eclipse.gef.commands.Command getSemanticCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request)

  Overrides:
    `getSemanticCommand` in class `org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy`

### addDeleteViewCommand

    protected org.eclipse.gef.commands.Command addDeleteViewCommand(org.eclipse.gef.commands.Command mainCommand,
                                                                    org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest completedRequest)

### getSemanticCommandSwitch

    protected org.eclipse.gef.commands.Command getSemanticCommandSwitch(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req)

### getConfigureCommand

    protected org.eclipse.gef.commands.Command getConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest req)

### getCreateRelationshipCommand

    protected org.eclipse.gef.commands.Command getCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req)

### getCreateCommand

    protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req)

### getSetCommand

    protected org.eclipse.gef.commands.Command getSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest req)

### getEditContextCommand

    protected org.eclipse.gef.commands.Command getEditContextCommand(org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest req)

### getDestroyElementCommand

    protected org.eclipse.gef.commands.Command getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req)

### getDestroyReferenceCommand

    protected org.eclipse.gef.commands.Command getDestroyReferenceCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req)

### getDuplicateCommand

    protected org.eclipse.gef.commands.Command getDuplicateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req)

### getMoveCommand

    protected org.eclipse.gef.commands.Command getMoveCommand(org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest req)

### getReorientReferenceRelationshipCommand

    protected org.eclipse.gef.commands.Command getReorientReferenceRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest req)

### getReorientRelationshipCommand

    protected org.eclipse.gef.commands.Command getReorientRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest req)

### getGEFWrapper

    protected final org.eclipse.gef.commands.Command getGEFWrapper(org.eclipse.gmf.runtime.common.core.command.ICommand cmd)

### getMSLWrapper

    protected final org.eclipse.gef.commands.Command getMSLWrapper(org.eclipse.gmf.runtime.common.core.command.ICommand cmd)

  Deprecated. use getGEFWrapper() instead

### getSemanticElement

    protected org.eclipse.emf.ecore.EObject getSemanticElement()

### getEditingDomain

    protected org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()

  Returns editing domain from the host edit part.

### getDestroyElementCommand

    protected org.eclipse.gef.commands.Command getDestroyElementCommand(org.eclipse.gmf.runtime.notation.View view)

  Creates command to destroy the link. Modified : check whether the EditPart associated with the view exists. If the view is not visible, none EditPart match.

### getDestroyEdgesCommand

    protected org.eclipse.gef.commands.CompoundCommand getDestroyEdgesCommand()

  Creates commands to destroy all host incoming and outgoing links.

### addDestroyShortcutsCommand

    protected void addDestroyShortcutsCommand(org.eclipse.gef.commands.CompoundCommand command)

Copyright 2007 Anyware Technologies. All Rights Reserved.