svn commit: r13085 - branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: b00__1
Date: 2007-07-15 22:18:55-0700
New Revision: 13085
Modified:
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java
Log:
Concentrate the firing of events in one place
Modified: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java?view=diff&rev=13085&p1=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java&p2=branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java&r1=13084&r2=13085
==============================================================================
--- branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java (original)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java 2007-07-15 22:18:55-0700
@@ -38,7 +38,6 @@
import org.argouml.model.AbstractModelEventPump;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
/**
@@ -215,13 +214,13 @@
* @see org.eclipse.emf.common.notify.Adapter#notifyChanged(Notification)
* @param notification The notification event
*/
+ @SuppressWarnings("unchecked")
public void notifyChanged(Notification notification) {
Object notifier = notification.getNotifier();
List<Listener> array = registerForElement.get(notifier);
if (array != null) {
for (Listener l : array) {
- // TODO: test the propery names
- // TODO: notify listeners
+ fireNotification(notification, l);
}
}
@@ -230,13 +229,16 @@
Class type = (Class) o;
if (type.isAssignableFrom(notifier.getClass())) {
for (Listener l : registerForClass.get(o)) {
- // TODO: test the propery names
- // TODO: notify listeners
+ fireNotification(notification, l);
}
}
}
}
}
+
+ private void fireNotification(Notification n, Listener l) {
+ // TODO: verify the property names && fire the notification
+ }
public void startPumpingEvents() {
rootContainerAdapter.setDeliverEvents(true);