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

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,GClass,CM,org.eclipse.emf.ecore.EClass>
                      extended by org.eclipse.gmt.umlx.mm.editor.regimes.GClassChildRegime<GClassAttribute,org.eclipse.emf.ecore.EAttribute>
                          extended by org.eclipse.gmt.umlx.mm.editor.regimes.GClassAttributeRegime
All Implemented Interfaces:
INodeRegimeCo0<GClassAttribute,GClass>, INodeRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>, IRegime, IRegimeCo0<GClassAttribute,GClass>, IRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>, IClassExtension

public class GClassAttributeRegime
extends GClassChildRegime<GClassAttribute,org.eclipse.emf.ecore.EAttribute>


Field Summary
static GClassAttributeRegime INSTANCE
           
 
Method Summary
 IRegimeCo1<?,?,?,?> canCoChange(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context)
           
 IErrorMessage cannotCreate(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context, org.eclipse.draw2d.geometry.Point loc)
           
 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.
 GClassAttribute createModelObject()
          Create a new and uninitialised EMF object of the type managed by this regime.
 AbstractPropertySource createPropertySource(GClassAttribute model)
           
 org.eclipse.gef.EditPart createView(SheetViewer viewer, GClassAttribute 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.
 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()
           
 java.lang.Object 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.
 
Methods inherited from class org.eclipse.gmt.umlx.mm.editor.regimes.GClassChildRegime
createFigure, 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
coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, getCoModelFor, getCoModelParentClass, getLabel, isLink, isNode, isRegimeCo1, isRegimeCo2, loadCoModelClass
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime
canCopy, canDelete, computeProblemMessage, createCreateChildLinkCommand, createDeleteCommand, createFacets, 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, createDeleteCommand, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, 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, createDeleteCommand, createOutline, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, 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 GClassAttributeRegime INSTANCE
Method Detail

getPaletteEntry

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

canCoChange

public IRegimeCo1<?,?,?,?> canCoChange(IActiveEditDomain editDomain,
                                       java.lang.Object coModel,
                                       java.lang.Object context)
Specified by:
canCoChange in interface IRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Overrides:
canCoChange in class AbstractNodeRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>

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<GClassAttribute,GClass>
Overrides:
cannotCreate in class AbstractNodeRegimeCo0<GClassAttribute,GClass>

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<GClassAttribute,GClass>

createModelObject

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

createPropertySource

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

createView

public org.eclipse.gef.EditPart createView(SheetViewer viewer,
                                           GClassAttribute model)
Specified by:
createView in interface IRegimeCo0<GClassAttribute,GClass>
Overrides:
createView in class AbstractRegime<GClassAttribute,GClass>

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 GClassChildRegime<GClassAttribute,org.eclipse.emf.ecore.EAttribute>
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<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Specified by:
getCoRegime in interface IRegime
Specified by:
getCoRegime in interface IRegimeCo0<GClassAttribute,GClass>
Specified by:
getCoRegime in interface IRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Specified by:
getCoRegime in class AbstractNodeRegimeCo1<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
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

getParentCoModel

public java.lang.Object 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<GClassAttribute,GClass,org.eclipse.emf.ecore.EAttribute,org.eclipse.emf.ecore.EClass>
Overrides:
getParentCoModel in class GClassChildRegime<GClassAttribute,org.eclipse.emf.ecore.EAttribute>
Parameters:
editDomain - edit domain containing objects
parent - parent of graphical model
Returns:
co-model of parent