Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » FeatureMap, SetCommand, and dynamic attributes
FeatureMap, SetCommand, and dynamic attributes [message #720454] Tue, 30 August 2011 15:32 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
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 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

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
Previous Topic:[CDO] Move operations make the moved element dirty
Next Topic:[Databinding] Observing multiple resources
Goto Forum:
  


Current Time: Sat Apr 20 00:51:39 GMT 2024

Powered by FUDForum. Page generated in 0.03052 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top