Home » Modeling » EMF » FeatureMap, SetCommand, and dynamic attributes
FeatureMap, SetCommand, and dynamic attributes [message #720454] |
Tue, 30 August 2011 15:32 |
|
Hi all,
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.
IMHO, this can be considered as a bug that prevent the SetCommand to
work when the eSet method works.
What do you think? Should I open it as a bug?
Regards,
Mickael
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
|
|
|
Re: FeatureMap, SetCommand, and dynamic attributes [message #720492 is a reply to message #720454] |
Tue, 30 August 2011 17:31 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Mickael,
Comments below.
On 30/08/2011 8:32 AM, Mickael Istria wrote:
> Hi all,
>
> 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.
> IMHO, this can be considered as a bug that prevent the SetCommand to
> work when the eSet method works.
You probably should be manipulating the feature map directly by creating
a feature map entry (FeatureMapUtil.createEntry) and adding that.
>
> What do you think? Should I open it as a bug?
Probably the set command should just work, but all the commands were
written long before there were feature maps and open content, so none of
them consider those cases. So you can open a bugzilla, but I'm not so
likely to find much time, especially given there are other ways to
accomplish the same goal.
>
> Regards,
> Mickael
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: FeatureMap, SetCommand, and dynamic attributes [message #720810 is a reply to message #720492] |
Wed, 31 August 2011 09:26 |
|
On 30/08/2011 19:31, Ed Merks wrote:
> Mickael,
>
> Comments below.
>
> On 30/08/2011 8:32 AM, Mickael Istria wrote:
>> Hi all,
>>
>> 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.
>> IMHO, this can be considered as a bug that prevent the SetCommand to
>> work when the eSet method works.
> You probably should be manipulating the feature map directly by creating
> a feature map entry (FeatureMapUtil.createEntry) and adding that.
Actually I'm trying to use the EMF databinding, that relies on the
SetCommand.
>>
>> What do you think? Should I open it as a bug?
> Probably the set command should just work, but all the commands were
> written long before there were feature maps and open content, so none of
> them consider those cases. So you can open a bugzilla
Done at https://bugs.eclipse.org/bugs/show_bug.cgi?id=356291
Thanks.
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
|
|
|
Goto Forum:
Current Time: Sat Apr 20 00:51:39 GMT 2024
Powered by FUDForum. Page generated in 0.03052 seconds
|