@SuppressWarnings("deprecation")
private void fireEventToCompositionListeners( Notification msg ) {
if( msg.getFeatureID(ContextModel.class)==ProjectPackage.CONTEXT_MODEL__LAYERS ){
switch( msg.getEventType() ) {
case Notification.ADD:
notifyCompositionListeners(new MapCompositionEvent(map, EventType.ADDED,
msg.getNewValue(), msg.getOldValue(), (ILayer) msg.getNewValue()));
break;
case Notification.ADD_MANY:
notifyCompositionListeners(new MapCompositionEvent(map, EventType.MANY_ADDED,
msg.getNewValue(), msg.getOldValue(), null));
break;
case Notification.REMOVE:
notifyCompositionListeners(new MapCompositionEvent(map, EventType.REMOVED,
msg.getNewValue(), msg.getOldValue(), (ILayer)msg.getOldValue()));
break;
case Notification.REMOVE_MANY:
notifyCompositionListeners(new MapCompositionEvent(map, EventType.MANY_REMOVED,
msg.getNewValue(), msg.getOldValue(), null));
break;
case Notification.MOVE:
notifyCompositionListeners(new MapCompositionEvent(map, EventType.REORDERED,
msg.getPosition(), msg.getOldValue(), (ILayer)msg.getNewValue()));
break;
default:
break;