org.eclipse.gmt.umlx.ecore
Class CoModelAdapter<M extends GModelElement,CM extends org.eclipse.emf.common.notify.Notifier>
java.lang.Object
org.eclipse.gmt.umlx.ecore.AbstractAdapter
org.eclipse.gmt.umlx.ecore.ModelChangeAdapter
org.eclipse.gmt.umlx.ecore.CoModelAdapter<M,CM>
- All Implemented Interfaces:
- java.lang.Iterable<java.util.List<M>>, org.eclipse.emf.common.notify.Adapter, IModelChangeListener
public class CoModelAdapter<M extends GModelElement,CM extends org.eclipse.emf.common.notify.Notifier>
- extends ModelChangeAdapter
- implements IModelChangeListener, java.lang.Iterable<java.util.List<M>>
CoModelAdapter maintains a per-sheet list of models that reference a particular
comodel, thereby making the process of finding all models (in a or all sheets)
that reference a given comodel simple.
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Method Summary |
static
<M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier>
void |
|
addModel(CM1 coModel,
M1 model)
|
|
addModel(M1 model)
|
static
|
basicGetAdapter(CM1 coModel)
|
static
|
basicGetModels(CM1 coModel,
GSheet sheet)
|
java.util.List<? extends M> |
basicGetModelsFor(GSheet sheet)
|
static
|
getAdapter(CM1 coModel)
|
static GModelElement |
getModel(java.lang.Object coModel,
GSheet sheet,
GElement preferredModel)
|
static
|
getModels(CM1 coModel,
GSheet sheet)
|
java.util.List<? extends M> |
getModelsFor(GSheet sheet)
|
int |
getSheetCount()
|
boolean |
isAdapterForType(java.lang.Object type)
|
java.util.Iterator<java.util.List<M>> |
iterator()
|
void |
modelChanged(org.eclipse.emf.common.notify.Notification notification)
|
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
|
static
<M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier>
void |
|
removeModel(CM1 coModel,
M1 model)
|
|
removeModel(M1 model)
|
static void |
replaceModel(org.eclipse.emf.ecore.EModelElement oldCoModel,
org.eclipse.emf.ecore.EModelElement newCoModel,
GModelElement model)
|
boolean |
setReparenting(boolean isReparenting)
|
java.lang.String |
toString()
|
java.util.Collection<java.util.List<M>> |
values()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
addModel
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> void addModel(CM1 coModel,
M1 model)
basicGetAdapter
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> CoModelAdapter<?,CM1> basicGetAdapter(CM1 coModel)
basicGetModels
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> java.util.List<? extends GModelElement> basicGetModels(CM1 coModel,
GSheet sheet)
getAdapter
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> CoModelAdapter<?,CM1> getAdapter(CM1 coModel)
getModels
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> java.util.List<? extends GModelElement> getModels(CM1 coModel,
GSheet sheet)
getModel
public static GModelElement getModel(java.lang.Object coModel,
GSheet sheet,
GElement preferredModel)
removeModel
public static <M1 extends GModelElement,CM1 extends org.eclipse.emf.common.notify.Notifier> void removeModel(CM1 coModel,
M1 model)
replaceModel
public static void replaceModel(org.eclipse.emf.ecore.EModelElement oldCoModel,
org.eclipse.emf.ecore.EModelElement newCoModel,
GModelElement model)
addModel
public <M1 extends GModelElement> void addModel(M1 model)
basicGetModelsFor
public java.util.List<? extends M> basicGetModelsFor(GSheet sheet)
getModelsFor
public java.util.List<? extends M> getModelsFor(GSheet sheet)
getSheetCount
public int getSheetCount()
isAdapterForType
public boolean isAdapterForType(java.lang.Object type)
- Specified by:
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
iterator
public java.util.Iterator<java.util.List<M>> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<java.util.List<M extends GModelElement>>
modelChanged
public void modelChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
modelChanged
in interface IModelChangeListener
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
notifyChanged
in class AbstractAdapter
removeModel
public <M1 extends GModelElement> void removeModel(M1 model)
setReparenting
public boolean setReparenting(boolean isReparenting)
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractAdapter
values
public java.util.Collection<java.util.List<M>> values()