I finally got it to work using the first approach. I did not know why the handleLayerEvent was not called in the first place, maybe Eclipse still thought my project was up-to-date. Had this strange behaviour in the past sometimes. Re-implementing it and cleaning the whole project made it work.
If anyone else needs to accomplish this, here is how I got it to work:
Created an event handler which implements ILayerEventHandler<RowReorderEvent>
Made the getLayerEventClass() method return RowReorderEvent.class
Implemented the handling code in handleLayerEvent(RowReorderEvent evt)
registered the event handler on the Body layer stack
Constructed the Body layer stack the following way: ViewportLayer -> SelectionLayer -> RowReorderLayer -> ColumnHideShowLayer -> ColumnReorderLayer -> DataLayer
Maybe I should have a look at GlazedLists... In my case, I have to propagate model changes via EMF commands on an EditingDomain, is this possible with GlazedLists?
1. There is one big limitation to your approach in the current architecture. The ILayerEventHandler is used internally to add typed event handling support in the layers themselves. As internally only one handler for events is necessary (e.g. performing transformations) it is only possible to register ONE such handler to a layer.
If another handler was registered before, you replace it with your approach.
If you ever want to add another listener, you will replace your listener.
Therefore you shouldn't use the ILayerEventHandler to listen to NatTable events. You should use the ILayerListener and add checks for the event type for your use cases.
This is just another reason why the NatTable architecture needs to be revised in the near future.
2. GlazedLists is a list implementation for high performance operations with lists like filtering, sorting, tree building and more. It also supports event handling. That means GlazedLists are firing ListChangeEvents similar to WritableLists in JFace or ObservableLists in JavaFX. If that is your question than yes it is possible with GlazedLists. If your question is about the properties of a value in your list, than no, you need to add this yourself. The GlazedListsEventLayer in NatTable adds a PropertyChangeListener approach. But you need to attach your listeners yourself. This is for example used to implement blinking.