org.eclipse.gmt.umlx.mm.editor.regimes
Class GAssociationRegime

java.lang.Object
  extended by org.eclipse.gmt.umlx.utils.ClassExtension<M>
      extended by org.eclipse.gmt.umlx.editor.regime.AbstractRegime<LM,P>
          extended by org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo0<SM,LM,TM,P>
              extended by org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo1<SM,LM,TM,P,CM,CP>
                  extended by org.eclipse.gmt.umlx.editor.regimes.GSheetLinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>
                      extended by org.eclipse.gmt.umlx.mm.editor.regimes.GAssociationRegime
All Implemented Interfaces:
ILinkRegimeCo0<GClass,GAssociation,GClass,MmSheet>, ILinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>, ILinkRegimeEnums, IRegime, IRegimeCo0<GAssociation,MmSheet>, IRegimeCo1<GAssociation,MmSheet,E2DirectedAssociation,E2Association>, IClassExtension

public class GAssociationRegime
extends GSheetLinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.gmt.umlx.editor.regime.ILinkRegimeEnums
ILinkRegimeEnums.IsCreate, ILinkRegimeEnums.IsReconnect, ILinkRegimeEnums.IsReCreate
 
Field Summary
static GAssociationRegime INSTANCE
           
static GAssociationRegime ONE_WAY_INSTANCE
           
 
Method Summary
 LinkFigure createFigure(ILinkViewElement view)
          Create the figure object to be drawn in the sheet editor.
 GAssociation createModelObject()
          Create a new and uninitialised EMF object of the type managed by this regime.
 AssociationView createView(SheetViewer viewer, GAssociation model)
           
 GModelElement getBackElement(java.lang.Object editModel)
          Return the non-opaque model element behind the graphical editModel.
 E2DirectedAssociationRegime getCoRegime()
          Return the co-regime if it has one.
 java.lang.Enum getIcon()
          Return the icon to be shown in the construction context (the Palette for GCore objects, the Outline for ECore objects).
static GAssociationRegime getInstance(boolean oppositeShown)
           
 java.lang.String getLabel()
          Return a descriptive label for the managed object type
static org.eclipse.gef.palette.PaletteEntry getPaletteEntry(boolean oppositeShown)
           
static org.eclipse.gef.palette.PaletteEntry getPaletteEntry(java.lang.String showOpposite)
           
 java.lang.Object getParentCoModel(IActiveEditDomain editDomain, GModelElement source, java.lang.Object parent, GModelElement target)
          Return the object to be coModel of the parent of a model created by this regime in editDomain between coSource and coTarget.
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regimes.GSheetLinkRegimeCo1
cannotCoCreate, createFacets, createPropertySource, getBendpoints, getCoModel, getSheetClass, getSource0, getSourceConnections, getTarget0, getTargetConnections, removeConnection, setCoModel
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo1
canCoChange, coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, getCoModelParentClass, getParentCoModel, isLink, isNode, isRegimeCo1, isRegimeCo2, loadCoModelClass
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo0
addConnection, canBeReversed, cannotConnectBetween, cannotConnectFrom, cannotConnectTo, createCreateCommand, createLinkEnd, createModelObject, createReconnectCommand, getActualConnection, getActualConnectionsBetween, getCoCoModelsFor, getPotentialCoConnection, getPotentialCoConnectionsBetween, getPotentialConnection, getPotentialConnectionsBetween, getSource, getSourceLinkEnd, getSourceModelClass, getSourceNode, getTarget, getTargetLinkEnd, getTargetModelClass, getTargetNode, isContainment, resolveRegime, sourceIsOptional, targetIsOptional
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime
canCopy, canDelete, computeProblemMessage, createCreateChildLinkCommand, createCreateCommand, createDeleteCommand, createOutline, getBasicClass, getFacets, getModelClass, getNewNamePrefix, getParentModelClass, initialise, isRegimeCo0, load, refreshProblemMessage, toString
 
Methods inherited from class org.eclipse.gmt.umlx.utils.ClassExtension
toDebugString, toUserString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createDeleteCommand, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, createCreateCommand, createLinkEnd, getNewNamePrefix
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.ILinkRegimeCo0
addConnection, canBeReversed, cannotConnectBetween, cannotConnectFrom, cannotConnectTo, createCreateCommand, createModelObject, createReconnectCommand, getActualConnection, getActualConnectionsBetween, getCoCoModelsFor, getPotentialCoConnection, getPotentialConnection, getPotentialConnectionsBetween, getSource, getSourceLinkEnd, getSourceModelClass, getSourceNode, getTarget, getTargetLinkEnd, getTargetModelClass, getTargetNode, isContainment, resolveRegime, sourceIsOptional, targetIsOptional
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createDeleteCommand, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, createCreateCommand, createLinkEnd, getNewNamePrefix
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 

Field Detail

INSTANCE

public static final GAssociationRegime INSTANCE

ONE_WAY_INSTANCE

public static final GAssociationRegime ONE_WAY_INSTANCE
Method Detail

getInstance

public static GAssociationRegime getInstance(boolean oppositeShown)

getPaletteEntry

public static org.eclipse.gef.palette.PaletteEntry getPaletteEntry(java.lang.String showOpposite)

getPaletteEntry

public static org.eclipse.gef.palette.PaletteEntry getPaletteEntry(boolean oppositeShown)

createFigure

public LinkFigure createFigure(ILinkViewElement view)
Description copied from interface: ILinkRegimeCo0
Create the figure object to be drawn in the sheet editor.

Specified by:
createFigure in interface ILinkRegimeCo0<GClass,GAssociation,GClass,MmSheet>
Overrides:
createFigure in class AbstractLinkRegimeCo0<GClass,GAssociation,GClass,MmSheet>
Returns:
a figure

createModelObject

public GAssociation createModelObject()
Description copied from interface: IRegime
Create a new and uninitialised EMF object of the type managed by this regime.

Specified by:
createModelObject in interface IRegime
Specified by:
createModelObject in interface IRegimeCo0<GAssociation,MmSheet>
Overrides:
createModelObject in class AbstractRegime<GAssociation,MmSheet>

createView

public AssociationView createView(SheetViewer viewer,
                                  GAssociation model)
Specified by:
createView in interface IRegimeCo0<GAssociation,MmSheet>
Overrides:
createView in class AbstractRegime<GAssociation,MmSheet>

getBackElement

public GModelElement getBackElement(java.lang.Object editModel)
Description copied from interface: IRegime
Return the non-opaque model element behind the graphical editModel.

Specified by:
getBackElement in interface IRegime
Overrides:
getBackElement in class AbstractRegime<GAssociation,MmSheet>
Returns:
the non-opaque model element behind the graphical editModel

getCoRegime

public E2DirectedAssociationRegime getCoRegime()
Description copied from interface: IRegime
Return the co-regime if it has one.

Specified by:
getCoRegime in interface ILinkRegimeCo0<GClass,GAssociation,GClass,MmSheet>
Specified by:
getCoRegime in interface ILinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>
Specified by:
getCoRegime in interface IRegime
Specified by:
getCoRegime in interface IRegimeCo0<GAssociation,MmSheet>
Specified by:
getCoRegime in interface IRegimeCo1<GAssociation,MmSheet,E2DirectedAssociation,E2Association>
Specified by:
getCoRegime in class AbstractLinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>
Returns:
co-regime class or null

getIcon

public java.lang.Enum getIcon()
Description copied from interface: IRegime
Return the icon to be shown in the construction context (the Palette for GCore objects, the Outline for ECore objects).

Returns:
the icon

getLabel

public java.lang.String getLabel()
Description copied from interface: IRegime
Return a descriptive label for the managed object type

Returns:
label

getParentCoModel

public java.lang.Object getParentCoModel(IActiveEditDomain editDomain,
                                         GModelElement source,
                                         java.lang.Object parent,
                                         GModelElement target)
Description copied from interface: ILinkRegimeCo1
Return the object to be coModel of the parent of a model created by this regime in editDomain between coSource and coTarget. The return is nominally just parent.coModel() after type validation, but derived implementations may add policies to provide defaults parents for orphans.

Specified by:
getParentCoModel in interface ILinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>
Specified by:
getParentCoModel in class AbstractLinkRegimeCo1<GClass,GAssociation,GClass,MmSheet,E2DirectedAssociation,E2Association>
Parameters:
editDomain - domain in which to create
source - connection source
parent - parent of instantiation
target - connection target
Returns:
the parent co-model