Community
Participate
Working Groups
From forum thread: http://www.eclipse.org/forums/index.php/t/237622/ I am trying to use dynamic attributes to "wrap" manipulation of a FeatureMap I have in my metamodel. Let's say that I have an Element MyElement, which has a mixed featureMap called "group". Then I want to manipulate this "group" with dynamic annotated EAttributes, so that I can perform eGet and eSet directly on my eObject and it resolves the values in my group (through the eOpenSet method). Out of the transactional world, with eGet, eSet and so on, everything is working fine. However, when I want to use the SetCommand, it fails because of a check on the static class. This makes impossible to use EMF DataBinding with FeatureMaps.
*** Bug 356293 has been marked as a duplicate of this bug. ***
Created attachment 202542 [details] Suggested tests that shows different behavior between normal and transactional This is a couple of test that perform the same operation in a non-transactional and a transactional context, with different behavior. It highlights that the canExecute method of SetCommand is too constraining.
Created attachment 202546 [details] Suggested fix on the SetCommand class to check also affiliation for a dynamic feature In case the feature is not part of the static class, this simply checks whether the affiliation of the feature is part of it.
Ed, Did you have time to have a look to suggested patches? I'd really like to see this fixed in upcoming SR1 if it is still possible.
I'm quite sure that feature maps where never designed to handle proxy resolution so it won't be easy to fix. Unfortunately I'm extremely busy right now and won't have time to look into it in time for SR1.
In case you missed it, 2 weeks ago, I provided unit tests and a patch to have SetCommand working for the use case I describe. Fixing it would be just reviewing and applying these patches. I can understand it is a bit late to get it into SR1, too bad...
I committed the fix for 2.7.1 and 2.8.0.
Thanks a lot Ed!
The changes are available in 2.7.1 and 2.8.0 builds.
Created attachment 205133 [details] fix null feature
This patch introduces a big regression : it assumes feature is not null, while SetCommand.create with feature null is used a lot in the EMF code itself. patch attached.
I think
I think it is a really big regression that can have a lot of impacts. It brokes the DnD in all our GEF editors since DragAndDropCommand uses it.