|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.mint.util.GroupAdapterImpl
public abstract class GroupAdapterImpl
Adapter for tracking changes to a group of related objects. Each time a related object is added to the group (typically through a reference), changes to its features are tracked and notifications forwarded to registered listeners. This is particularly useful when an object's derived feature depends on a feature that belongs to one of its referenced objects.
Clients may extend this class.
Nested Class Summary | |
---|---|
protected class |
GroupAdapterImpl.NotificationForwarder
Adapter used to forward notifications from related objects to the root object. |
protected static class |
GroupAdapterImpl.NotifierEList
Deprecated. no longer used |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
Adapter.Internal |
Field Summary | |
---|---|
protected GroupAdapterImpl.NotifierEList |
targets
Deprecated. this adapter only tracks a single target |
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
---|
target |
Constructor Summary | |
---|---|
GroupAdapterImpl()
|
Method Summary | |
---|---|
protected void |
addGroupTargets(List<? extends Notifier> groupTargets)
Adds the given targets to the group of tracked targets. |
protected GroupAdapterImpl.NotificationForwarder |
createNotificationForwarder()
Creates a new @{link NotificationForwarder}. |
void |
dispose()
Disposes the adapter by removing it from its target. |
protected abstract List<EReference> |
getGroupReferences(EObject object)
Returns the object's references that define its direct relations. |
protected List<EObject> |
getGroupTargets(EObject object)
Returns the object's direct relations. |
protected Notifier |
getRootTarget()
Deprecated. use AdapterImpl.getTarget() instead |
protected boolean |
isGroupReference(EObject object,
EReference ref)
Determines whether the object's reference participates in defining its relations. |
void |
notifyChanged(Notification msg)
|
protected void |
removeGroupTargets(List<? extends Notifier> groupTargets)
Removes the targets from the group of tracked targets. |
void |
setTarget(Notifier target)
|
void |
unsetTarget(Notifier target)
|
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
---|
getTarget, isAdapterForType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GroupAdapterImpl.NotifierEList targets
Constructor Detail |
---|
public GroupAdapterImpl()
Method Detail |
---|
public void setTarget(Notifier target)
setTarget
in interface Adapter
setTarget
in class AdapterImpl
public void unsetTarget(Notifier target)
unsetTarget
in interface Adapter.Internal
unsetTarget
in class AdapterImpl
public void dispose()
public void notifyChanged(Notification msg)
notifyChanged
in interface Adapter
notifyChanged
in class AdapterImpl
protected GroupAdapterImpl.NotificationForwarder createNotificationForwarder()
protected void addGroupTargets(List<? extends Notifier> groupTargets)
groupTargets
- new targets to trackprotected void removeGroupTargets(List<? extends Notifier> groupTargets)
groupTargets
- targets to remove from the groupprotected List<EObject> getGroupTargets(EObject object)
object
- object whose direct relations to return
protected boolean isGroupReference(EObject object, EReference ref)
object
- objectref
- object's reference
true
if the given reference contributes its direct
relationsprotected abstract List<EReference> getGroupReferences(EObject object)
object
- object whose references to return
protected Notifier getRootTarget()
AdapterImpl.getTarget()
instead
|
Copyright 2008, 2009 Ecliptical Software Inc. and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |