Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Changed behavior in DelegatingMap.entrySet()

A BasicEMap is a list so you can iterate over it directly to get at the underlying Map.Entry EObjects; from the entrySet() view, you cannot map back to the EMap and from it's Map.Entry instances you cannot map back to the Map.Entry EObjects (except perhaps using some very horrible reflection code that's likely to break if the implementation details ever change.


On 24.01.2018 08:49, Erdal Karaca wrote:
Hi Ed,
I found out that in the commit 8e63bb31516b101ae52702e9fcbf7dc3386706cb (~ 2 years ago) the behavior has been changed:

org.eclipse.emf.common.util.BasicEMap.DelegatingMap.entrySet()

This method returns a view whose entries are not of type EObject anymore. In a legacy project this has been "exploited" to add Adapters to specific entries in the BasicEMap to listen to changes of the entries without listening to the whole map. When switching to the latest EMF version this does not work anymore.

What is the proper way to get the internal EObjects entries of the map or should I switch to listening to the whole map for changes?

Thanks!


_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/emf-dev


Back to the top