org.eclipse.gmt.umlx.tx.editor.regimes
Class TxClassAttributeVariableRegime

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.regime.AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
                      extended by org.eclipse.gmt.umlx.tx.editor.regimes.TxClassAttributeVariableRegime
All Implemented Interfaces:
INodeRegimeCo0<TxClassAttributeVariable,TxClassVariable>, INodeRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>, INodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>, IRegime, IRegimeCo0<TxClassAttributeVariable,TxClassVariable>, IRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>, IRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>, IClassExtension

public class TxClassAttributeVariableRegime
extends AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>


Field Summary
static TxClassAttributeVariableRegime INSTANCE
           
 
Method Summary
 IRegimeCo1<?,?,?,?> canCoChange(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context)
           
 IRegimeCo2<?,?,?,?> canCoCoChange(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object context)
           
 IErrorMessage cannotCoCoCreate(IActiveEditDomain editDomain, java.lang.Object coCoModel, java.lang.Object context, org.eclipse.draw2d.geometry.Point loc)
           
 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.
 INodeFigure createFigure(INodeViewElement view)
           
 TxClassAttributeVariable createModelObject()
          Create a new and uninitialised EMF object of the type managed by this regime.
 AbstractPropertySource createPropertySource(TxClassAttributeVariable model)
           
 TxClassAttributeVariableView createView(SheetViewer viewer, TxClassAttributeVariable model)
           
 EAttributeRegime getCoCoRegime()
           
 UAttributeVariable getCoModel(java.lang.Object model)
          Return the co-model of model if it has one.
 UAttributeVariableRegime 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.
 java.lang.Class<? extends GSheet> getSheetClass()
          Return the class of the sheet that this regime supports
 void setCoModel(TxClassAttributeVariable model, java.lang.Object coModel)
           
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo2
getCoCoModelFor, getThisChangeContext, getThisCreateContext, isLink, isNode, isRegimeCo2, loadCoCoModelClass
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo1
coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, getCoModelFor, getCoModelParentClass, getLabel, isRegimeCo1, loadCoModelClass
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime
canCopy, canDelete, computeProblemMessage, createCreateChildLinkCommand, createDeleteCommand, createFacets, createLinkEnd, createOutline, getBackElement, 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.IRegimeCo2
getCoModelFor
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo1
coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, loadCoModelClass
 
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, getBackElement, getCoModelParentClass, getLabel, 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.INodeRegimeCo1
isRegimeCo1
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo1
coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, loadCoModelClass
 
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, getBackElement, getCoModelParentClass, getLabel, 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, getBackElement, getCoModelParentClass, getLabel, getNewNamePrefix, getSource, getSourceModelClass, getTarget, getTargetModelClass
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 

Field Detail

INSTANCE

public static final TxClassAttributeVariableRegime 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<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Overrides:
canCoChange in class AbstractNodeRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>

canCoCoChange

public IRegimeCo2<?,?,?,?> canCoCoChange(IActiveEditDomain editDomain,
                                         java.lang.Object coModel,
                                         java.lang.Object context)
Specified by:
canCoCoChange in interface IRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Overrides:
canCoCoChange in class AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>

cannotCoCoCreate

public IErrorMessage cannotCoCoCreate(IActiveEditDomain editDomain,
                                      java.lang.Object coCoModel,
                                      java.lang.Object context,
                                      org.eclipse.draw2d.geometry.Point loc)
Specified by:
cannotCoCoCreate in interface INodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Overrides:
cannotCoCoCreate in class AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>

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<TxClassAttributeVariable,TxClassVariable>
Overrides:
cannotCreate in class AbstractNodeRegimeCo0<TxClassAttributeVariable,TxClassVariable>

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<TxClassAttributeVariable,TxClassVariable>

createFigure

public final INodeFigure createFigure(INodeViewElement view)
Specified by:
createFigure in interface INodeRegimeCo0<TxClassAttributeVariable,TxClassVariable>
Overrides:
createFigure in class AbstractNodeRegimeCo0<TxClassAttributeVariable,TxClassVariable>

getCoModel

public UAttributeVariable getCoModel(java.lang.Object model)
Description copied from interface: IRegime
Return the co-model of model if it has one.

Specified by:
getCoModel in interface IRegime
Specified by:
getCoModel in interface IRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Specified by:
getCoModel in class AbstractNodeRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Parameters:
model - model
Returns:
co-model or null

createModelObject

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

createPropertySource

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

createView

public TxClassAttributeVariableView createView(SheetViewer viewer,
                                               TxClassAttributeVariable model)
Specified by:
createView in interface IRegimeCo0<TxClassAttributeVariable,TxClassVariable>
Overrides:
createView in class AbstractRegime<TxClassAttributeVariable,TxClassVariable>

getCoCoRegime

public EAttributeRegime getCoCoRegime()

getCoRegime

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

Specified by:
getCoRegime in interface INodeRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Specified by:
getCoRegime in interface INodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Specified by:
getCoRegime in interface IRegime
Specified by:
getCoRegime in interface IRegimeCo0<TxClassAttributeVariable,TxClassVariable>
Specified by:
getCoRegime in interface IRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Specified by:
getCoRegime in interface IRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Specified by:
getCoRegime in class AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
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<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Overrides:
getParentCoModel in class AbstractNodeRegimeCo2<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>
Parameters:
editDomain - edit domain containing objects
parent - parent of graphical model
Returns:
co-model of parent

getSheetClass

public java.lang.Class<? extends GSheet> getSheetClass()
Description copied from interface: IRegime
Return the class of the sheet that this regime supports

Specified by:
getSheetClass in interface IRegime
Overrides:
getSheetClass in class AbstractRegime<TxClassAttributeVariable,TxClassVariable>
Returns:
sheet class or null.

setCoModel

public void setCoModel(TxClassAttributeVariable model,
                       java.lang.Object coModel)
Specified by:
setCoModel in interface IRegimeCo0<TxClassAttributeVariable,TxClassVariable>
Specified by:
setCoModel in class AbstractNodeRegimeCo1<TxClassAttributeVariable,TxClassVariable,UAttributeVariable,org.eclipse.emf.ecore.ENamedElement>