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

java.lang.Object
  extended by org.eclipse.gmt.umlx.utils.ClassExtension<M>
      extended by org.eclipse.gmt.umlx.editor.regime.AbstractRegime<M,P>
          extended by org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo0<M,P>
              extended by org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo1<M,P,CM,CP>
                  extended by org.eclipse.gmt.umlx.editor.regimes.GModelElementRegime<M,P,CM,CP>
                      extended by org.eclipse.gmt.umlx.editor.regimes.GSheetNodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
                          extended by org.eclipse.gmt.umlx.mm.editor.regimes.GSheetAttributeRegime
All Implemented Interfaces:
INodeRegimeCo0<GSheetAttribute,MmSheet>, INodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>, IRegime, IRegimeCo0<GSheetAttribute,MmSheet>, IRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>, IClassExtension

public class GSheetAttributeRegime
extends GSheetNodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>


Field Summary
static GSheetAttributeRegime INSTANCE
           
 
Method Summary
 IErrorMessage cannotCreate(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context, org.eclipse.draw2d.geometry.Point loc)
           
 IAbstractCommand createCreateChildLinkCommand(IActiveEditDomain editDomain, java.lang.Object coChild, java.lang.Object child, java.lang.Object parent)
          Create a command to create a graphical link between a newly created graphical child and its graphical parent.
 CreateCommand createCreateCommand(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context)
          Create a command to create an instance of the model element managed by this regime, with the created element a child of parent, and instantiating coModel.
 INodeFigure createFigure(INodeViewElement view)
           
 GSheetAttribute createModelObject()
          Create a new and uninitialised EMF object of the type managed by this regime.
 AbstractPropertySource createPropertySource(GSheetAttribute model)
           
 org.eclipse.gef.EditPart createView(SheetViewer viewer, GSheetAttribute model)
           
 GModelElement getBackElement(java.lang.Object editModel)
          Return the non-opaque model element behind the graphical editModel.
 EAttributeRegime getCoRegime()
          Return the co-regime if it has one.
 org.eclipse.emf.ecore.EClass getEClass(IActiveEditDomain editDomain, org.eclipse.emf.ecore.EAttribute coModel, java.lang.Object context)
           
 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 org.eclipse.gef.palette.PaletteEntry getPaletteEntry()
           
 org.eclipse.emf.ecore.EClass getParentCoModel(IActiveEditDomain editDomain, java.lang.Object parent)
          Return the object to be coModel of the parent of a model created by this regime in editDomain.
 boolean loadCoModelClass()
           
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regimes.GSheetNodeRegimeCo1
createDeleteCommand, createFacets, getSheetClass
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regimes.GModelElementRegime
getCoModel, setCoModel
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo1
canCoChange, coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, getCoModelFor, getCoModelParentClass, getLabel, isLink, isNode, isRegimeCo1, isRegimeCo2
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime
canCopy, canDelete, computeProblemMessage, createLinkEnd, createOutline, getBasicClass, getFacets, getModelClass, getNewNamePrefix, getParentModelClass, getSource, getSourceModelClass, getTarget, getTargetModelClass, 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, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createLinkEnd, getNewNamePrefix, getSource, getSourceModelClass, getTarget, getTargetModelClass
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createLinkEnd, getNewNamePrefix, getSource, getSourceModelClass, getTarget, getTargetModelClass
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 

Field Detail

INSTANCE

public static final GSheetAttributeRegime INSTANCE
Method Detail

getPaletteEntry

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

cannotCreate

public IErrorMessage cannotCreate(IActiveEditDomain editDomain,
                                  java.lang.Object coModel,
                                  java.lang.Object context,
                                  org.eclipse.draw2d.geometry.Point loc)
Specified by:
cannotCreate in interface INodeRegimeCo0<GSheetAttribute,MmSheet>
Overrides:
cannotCreate in class AbstractNodeRegimeCo0<GSheetAttribute,MmSheet>

createCreateChildLinkCommand

public IAbstractCommand createCreateChildLinkCommand(IActiveEditDomain editDomain,
                                                     java.lang.Object coChild,
                                                     java.lang.Object child,
                                                     java.lang.Object parent)
Description copied from interface: IRegime
Create a command to create a graphical link between a newly created graphical child and its graphical parent. This is used to create an attribution link when a sheet attribute is created.

Specified by:
createCreateChildLinkCommand in interface IRegime
Overrides:
createCreateChildLinkCommand in class AbstractRegime<GSheetAttribute,MmSheet>

createCreateCommand

public CreateCommand createCreateCommand(IActiveEditDomain editDomain,
                                         java.lang.Object coModel,
                                         java.lang.Object context)
Description copied from interface: IRegime
Create a command to create an instance of the model element managed by this regime, with the created element a child of parent, and instantiating coModel.

Specified by:
createCreateCommand in interface IRegime
Overrides:
createCreateCommand in class AbstractRegime<GSheetAttribute,MmSheet>

createFigure

public INodeFigure createFigure(INodeViewElement view)
Specified by:
createFigure in interface INodeRegimeCo0<GSheetAttribute,MmSheet>
Overrides:
createFigure in class AbstractNodeRegimeCo0<GSheetAttribute,MmSheet>

createModelObject

public GSheetAttribute 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<GSheetAttribute,MmSheet>
Overrides:
createModelObject in class AbstractRegime<GSheetAttribute,MmSheet>

createPropertySource

public AbstractPropertySource createPropertySource(GSheetAttribute model)
Specified by:
createPropertySource in interface IRegimeCo0<GSheetAttribute,MmSheet>
Overrides:
createPropertySource in class AbstractRegime<GSheetAttribute,MmSheet>

createView

public org.eclipse.gef.EditPart createView(SheetViewer viewer,
                                           GSheetAttribute model)
Specified by:
createView in interface IRegimeCo0<GSheetAttribute,MmSheet>
Overrides:
createView in class AbstractRegime<GSheetAttribute,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<GSheetAttribute,MmSheet>
Returns:
the non-opaque model element behind the graphical editModel

getCoRegime

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

Specified by:
getCoRegime in interface INodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Specified by:
getCoRegime in interface IRegime
Specified by:
getCoRegime in interface IRegimeCo0<GSheetAttribute,MmSheet>
Specified by:
getCoRegime in interface IRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Specified by:
getCoRegime in class AbstractNodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Returns:
co-regime class or null

getEClass

public org.eclipse.emf.ecore.EClass getEClass(IActiveEditDomain editDomain,
                                              org.eclipse.emf.ecore.EAttribute coModel,
                                              java.lang.Object context)

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

getParentCoModel

public org.eclipse.emf.ecore.EClass getParentCoModel(IActiveEditDomain editDomain,
                                                     java.lang.Object parent)
Description copied from interface: IRegimeCo1
Return the object to be coModel of the parent of a model created by this regime in editDomain. 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 IRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Specified by:
getParentCoModel in class AbstractNodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Parameters:
editDomain - edit domain containing objects
parent - parent of graphical model
Returns:
co-model of parent

loadCoModelClass

public boolean loadCoModelClass()
Specified by:
loadCoModelClass in interface IRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Overrides:
loadCoModelClass in class AbstractNodeRegimeCo1<GSheetAttribute,MmSheet,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>