org.eclipse.gmt.umlx.editor.regimes
Class GSheetRegime<M extends GSheet,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
java.lang.Object
org.eclipse.gmt.umlx.utils.ClassExtension<M>
org.eclipse.gmt.umlx.editor.regime.AbstractRegime<M,P>
org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo0<M,P>
org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo1<M,GDiagramParent,CM,CP>
org.eclipse.gmt.umlx.editor.regimes.GSheetRegime<M,CM,CP>
- All Implemented Interfaces:
- INodeRegimeCo0<M,GDiagramParent>, INodeRegimeCo1<M,GDiagramParent,CM,CP>, IRegime, IRegimeCo0<M,GDiagramParent>, IRegimeCo1<M,GDiagramParent,CM,CP>, IClassExtension
- Direct Known Subclasses:
- MmSheetRegime, TxContextSheetRegime, TxRuleSheetRegime
public abstract class GSheetRegime<M extends GSheet,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
- extends AbstractNodeRegimeCo1<M,GDiagramParent,CM,CP>
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractNodeRegimeCo1 |
canCoChange, coModelIsOptional, createChangeCoModelCommand, getCoModelClass, getCoModelFor, getCoModelFor, getCoModelParentClass, getCoRegime, getLabel, isLink, isNode, isRegimeCo1, isRegimeCo2, loadCoModelClass |
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime |
computeProblemMessage, createCreateChildLinkCommand, createCreateCommand, createLinkEnd, createModelObject, createOutline, createPropertySource, getBackElement, getBasicClass, getFacets, getModelClass, getParentModelClass, getSource, getSourceModelClass, getTarget, getTargetModelClass, initialise, isRegimeCo0, load, refreshProblemMessage, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
canCopy
public boolean canCopy(IRegimeContext regimeContext,
M selectedObject)
- Specified by:
canCopy
in interface IRegimeCo0<M extends GSheet,GDiagramParent>
- Overrides:
canCopy
in class AbstractRegime<M extends GSheet,GDiagramParent>
canDelete
public boolean canDelete(IRegimeContext regimeContext,
M selectedObject)
- Specified by:
canDelete
in interface IRegimeCo0<M extends GSheet,GDiagramParent>
- Overrides:
canDelete
in class AbstractRegime<M extends GSheet,GDiagramParent>
createDeleteCommand
public DeleteCommand createDeleteCommand(DeleteDomain deleteDomain,
M model)
- Specified by:
createDeleteCommand
in interface IRegimeCo0<M extends GSheet,GDiagramParent>
- Overrides:
createDeleteCommand
in class AbstractRegime<M extends GSheet,GDiagramParent>
createFacets
public void createFacets(java.util.List<IFacet<? super M>> facetList)
- Overrides:
createFacets
in class AbstractRegime<M extends GSheet,GDiagramParent>
createView
public SheetView<M> createView(SheetViewer viewer,
M model)
- Specified by:
createView
in interface IRegimeCo0<M extends GSheet,GDiagramParent>
- Overrides:
createView
in class AbstractRegime<M extends GSheet,GDiagramParent>
getCoModel
public CM 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<M extends GSheet,GDiagramParent,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
- Specified by:
getCoModel
in class AbstractNodeRegimeCo1<M extends GSheet,GDiagramParent,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
- Parameters:
model
- model
- Returns:
- co-model or null
getNewNamePrefix
public java.lang.String getNewNamePrefix()
- Description copied from interface:
IRegime
- Return a prefix for autogenerated names.
- Specified by:
getNewNamePrefix
in interface IRegime
- Overrides:
getNewNamePrefix
in class AbstractRegime<M extends GSheet,GDiagramParent>
- Returns:
- prefix
getParentCoModel
public CP 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<M extends GSheet,GDiagramParent,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
- Specified by:
getParentCoModel
in class AbstractNodeRegimeCo1<M extends GSheet,GDiagramParent,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>
- Parameters:
editDomain
- edit domain containing objectsparent
- 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<M extends GSheet,GDiagramParent>
- Returns:
- sheet class or null.
setCoModel
public void setCoModel(M model,
java.lang.Object coModel)
- Specified by:
setCoModel
in interface IRegimeCo0<M extends GSheet,GDiagramParent>
- Specified by:
setCoModel
in class AbstractNodeRegimeCo1<M extends GSheet,GDiagramParent,CM extends org.eclipse.emf.ecore.ENamedElement,CP extends org.eclipse.emf.common.notify.Notifier>