org.eclipse.gmt.umlx.editor.regime
Class AbstractLinkRegimeCo2<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>

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.regime.AbstractLinkRegimeCo2<SM,LM,TM,P,CM,CP>
All Implemented Interfaces:
ILinkRegimeCo0<SM,LM,TM,P>, ILinkRegimeCo1<SM,LM,TM,P,CM,CP>, ILinkRegimeCo2<SM,LM,TM,P,CM,CP>, ILinkRegimeEnums, IRegime, IRegimeCo0<LM,P>, IRegimeCo1<LM,P,CM,CP>, IRegimeCo2<LM,P,CM,CP>, IClassExtension
Direct Known Subclasses:
GSheetLinkRegimeCo2

public abstract class AbstractLinkRegimeCo2<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
extends AbstractLinkRegimeCo1<SM,LM,TM,P,CM,CP>
implements ILinkRegimeCo2<SM,LM,TM,P,CM,CP>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.gmt.umlx.editor.regime.ILinkRegimeEnums
ILinkRegimeEnums.IsCreate, ILinkRegimeEnums.IsReconnect, ILinkRegimeEnums.IsReCreate
 
Method Summary
 IRegimeCo2<?,?,?,?> canCoCoChange(IActiveEditDomain editDomain, java.lang.Object coModel, java.lang.Object parent)
           
 IErrorMessage cannotCoCoCreate(IActiveEditDomain editDomain, java.lang.Object coCoModel, java.lang.Object context)
           
 java.lang.Object getCoCoModelFor(java.lang.Object coCoModel)
          Return the co-Model to be instantiated when coModel is being instantiated.
abstract  java.util.List<?> getCoCoModelsFor(java.lang.Object coSource, java.lang.Object coTarget)
           
abstract  ILinkRegimeCo1<?,CM,?,CP,?,?> getCoRegime()
          Return the co-regime if it has one.
 LM getThisChangeContext(java.lang.Object context)
           
 P getThisCreateContext(java.lang.Object context)
           
 ILinkRegimeCo2<SM,LM,TM,P,CM,CP> isLink()
           
 INodeRegimeCo2<LM,P,CM,CP> isNode()
           
 ILinkRegimeCo2<SM,LM,TM,P,CM,CP> isRegimeCo2()
          Return this non-null regime if it is suitable for use with two or more levels of co-model.
 boolean loadCoCoModelClass()
           
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo1
canCoChange, cannotCoCreate, coModelIsOptional, createChangeCoModelCommand, getCoModel, getCoModelClass, getCoModelFor, getCoModelParentClass, getParentCoModel, getParentCoModel, isRegimeCo1, loadCoModelClass, setCoModel
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractLinkRegimeCo0
addConnection, canBeReversed, cannotConnectBetween, cannotConnectFrom, cannotConnectTo, createCreateCommand, createFacets, createFigure, createLinkEnd, createModelObject, createReconnectCommand, getActualConnection, getActualConnectionsBetween, getBendpoints, getPotentialCoConnection, getPotentialCoConnectionsBetween, getPotentialConnection, getPotentialConnectionsBetween, getSource, getSource0, getSourceConnections, getSourceLinkEnd, getSourceModelClass, getSourceNode, getTarget, getTarget0, getTargetConnections, getTargetLinkEnd, getTargetModelClass, getTargetNode, isContainment, removeConnection, resolveRegime, sourceIsOptional, targetIsOptional
 
Methods inherited from class org.eclipse.gmt.umlx.editor.regime.AbstractRegime
canCopy, canDelete, computeProblemMessage, createCreateChildLinkCommand, createCreateCommand, createDeleteCommand, createModelObject, createOutline, createPropertySource, createView, getBackElement, getBasicClass, getFacets, getModelClass, getNewNamePrefix, getParentModelClass, getSheetClass, 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
canCoChange, coModelIsOptional, createChangeCoModelCommand, getCoModel, getCoModelClass, getCoModelFor, getParentCoModel, loadCoModelClass
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createDeleteCommand, createModelObject, createOutline, createPropertySource, createView, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage, setCoModel
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, createCreateCommand, createLinkEnd, getBackElement, getCoModelParentClass, getIcon, getLabel, getNewNamePrefix, getSheetClass
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.ILinkRegimeCo1
cannotCoCreate, getParentCoModel, isRegimeCo1
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo1
canCoChange, coModelIsOptional, createChangeCoModelCommand, getCoModel, getCoModelClass, getCoModelFor, getParentCoModel, loadCoModelClass
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createDeleteCommand, createModelObject, createOutline, createPropertySource, createView, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage, setCoModel
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, createCreateCommand, createLinkEnd, getBackElement, getCoModelParentClass, getIcon, getLabel, getNewNamePrefix, getSheetClass
 
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, createFigure, createModelObject, createReconnectCommand, getActualConnection, getActualConnectionsBetween, getBendpoints, getPotentialCoConnection, getPotentialConnection, getPotentialConnectionsBetween, getSource, getSource0, getSourceConnections, getSourceLinkEnd, getSourceModelClass, getSourceNode, getTarget, getTarget0, getTargetConnections, getTargetLinkEnd, getTargetModelClass, getTargetNode, isContainment, removeConnection, resolveRegime, sourceIsOptional, targetIsOptional
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegimeCo0
canCopy, canDelete, computeProblemMessage, createDeleteCommand, createModelObject, createOutline, createPropertySource, createView, getFacets, getModelClass, getParentModelClass, isRegimeCo0, refreshProblemMessage, setCoModel
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.regime.IRegime
createCreateChildLinkCommand, createCreateCommand, createLinkEnd, getBackElement, getCoModelParentClass, getIcon, getLabel, getNewNamePrefix, getSheetClass
 
Methods inherited from interface org.eclipse.gmt.umlx.utils.IClassExtension
getBasicClass, toDebugString, toUserString
 

Method Detail

canCoCoChange

public IRegimeCo2<?,?,?,?> canCoCoChange(IActiveEditDomain editDomain,
                                         java.lang.Object coModel,
                                         java.lang.Object parent)
Specified by:
canCoCoChange in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>

cannotCoCoCreate

public final IErrorMessage cannotCoCoCreate(IActiveEditDomain editDomain,
                                            java.lang.Object coCoModel,
                                            java.lang.Object context)
Specified by:
cannotCoCoCreate in interface ILinkRegimeCo2<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>

getCoCoModelFor

public java.lang.Object getCoCoModelFor(java.lang.Object coCoModel)
Description copied from interface: IRegimeCo2
Return the co-Model to be instantiated when coModel is being instantiated. Normally returns coModel, but derivations such as GREgime may map from an EReference to an E2Association.

Specified by:
getCoCoModelFor in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Parameters:
coCoModel - the co-co-model
Returns:
the co-co-model

getCoCoModelsFor

public abstract java.util.List<?> getCoCoModelsFor(java.lang.Object coSource,
                                                   java.lang.Object coTarget)
Specified by:
getCoCoModelsFor in interface ILinkRegimeCo0<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P>
Overrides:
getCoCoModelsFor in class AbstractLinkRegimeCo0<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P>

getThisChangeContext

public final LM getThisChangeContext(java.lang.Object context)

getThisCreateContext

public final P getThisCreateContext(java.lang.Object context)

getCoRegime

public abstract ILinkRegimeCo1<?,CM,?,CP,?,?> getCoRegime()
Description copied from interface: IRegime
Return the co-regime if it has one.

Specified by:
getCoRegime in interface ILinkRegimeCo0<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P>
Specified by:
getCoRegime in interface ILinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
getCoRegime in interface ILinkRegimeCo2<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
getCoRegime in interface IRegime
Specified by:
getCoRegime in interface IRegimeCo0<LM extends org.eclipse.emf.ecore.EModelElement,P>
Specified by:
getCoRegime in interface IRegimeCo1<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
getCoRegime in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
getCoRegime in class AbstractLinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Returns:
co-regime class or null

isLink

public ILinkRegimeCo2<SM,LM,TM,P,CM,CP> isLink()
Specified by:
isLink in interface IRegimeCo0<LM extends org.eclipse.emf.ecore.EModelElement,P>
Specified by:
isLink in interface IRegimeCo1<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
isLink in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Overrides:
isLink in class AbstractLinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>

isNode

public INodeRegimeCo2<LM,P,CM,CP> isNode()
Specified by:
isNode in interface IRegimeCo0<LM extends org.eclipse.emf.ecore.EModelElement,P>
Specified by:
isNode in interface IRegimeCo1<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
isNode in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Overrides:
isNode in class AbstractLinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>

isRegimeCo2

public ILinkRegimeCo2<SM,LM,TM,P,CM,CP> isRegimeCo2()
Description copied from interface: IRegime
Return this non-null regime if it is suitable for use with two or more levels of co-model.

Specified by:
isRegimeCo2 in interface ILinkRegimeCo0<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P>
Specified by:
isRegimeCo2 in interface ILinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Specified by:
isRegimeCo2 in interface IRegime
Specified by:
isRegimeCo2 in interface IRegimeCo0<LM extends org.eclipse.emf.ecore.EModelElement,P>
Overrides:
isRegimeCo2 in class AbstractLinkRegimeCo1<SM extends org.eclipse.emf.ecore.EObject,LM extends org.eclipse.emf.ecore.EModelElement,TM extends org.eclipse.emf.ecore.EObject,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>
Returns:
this or null

loadCoCoModelClass

public boolean loadCoCoModelClass()
Specified by:
loadCoCoModelClass in interface IRegimeCo2<LM extends org.eclipse.emf.ecore.EModelElement,P,CM extends org.eclipse.emf.common.notify.Notifier,CP>