Project: Eclipse_Platform_UI
Bug 364529 UIEventPublisher does not handle Notification.ADD_MANY and REMOVE_MANY
Reported: 2011-11-22 19:21:59 | Status: verified fixed

I was walking through some code that sought to respond to changes to the MApplication's menu contributions (formed from the 3.x <menuContributions> stanzas). My event listener was getting a strange event whose type was "UNKNOWN". It turns out that adding the generated MMenuContributions to the app instance (in MenuPersistence#read()) causes an EMF ADD_MANY notification, which we don't interpret properly in UIEventPublisher#getEventType(). We instead map the notification to event type "UNKNOWN", which has the effect that the old and new values are never set in the event properties. I'm not sure what we should be mapping this ADD_MANY to.

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolBarManagerRenderer.java bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/util/BindingProcessingAddon.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/UIEventPublisher.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/ContextProcessingAddon.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/UIEvents.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/UIAllTests.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/HeadlessContextPresentationEngine.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/UIEventTypesTest.java