List of EMF Notification event types (event type name – int)

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-5e.

Just a very quick post today, which will hopefully be useful to someone other than myself as well.

When using the org.eclipse.emf.common.notify.Notification interface in Eclipse GEF editors, more precisely in any extensions of Adapter or EContentAdapter (cf. respective tutorial at vogella.com) you use in EditParts, you may want to catch certain event types in your Adapter‘s notifyChanged() method.

In my case, I have an Adapter listen to model elements, and want to implement a switch statement for certain event types. I’m able to get the event type in the method via notification.getEventType() and print that to, say, System.out1, but this only gives me an int value. To be able to quickly implement the switch case for this event type, I thought it would be useful to have a list of event types and their corresponding int values. So here it is (one ordered alphabetically, and another one ordered by int value).

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…