Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Editing maps in property sheets
Editing maps in property sheets [message #1272788] Tue, 18 March 2014 19:41 Go to next message
Ricardo \\\"CaWal\\\" Cacheta Waldemarin is currently offline Ricardo \\\"CaWal\\\" Cacheta WaldemarinFriend
Messages: 29
Registered: January 2013
Junior Member
I'm developing a GMF editor and I need to model a certain attribute as a Map. I'm following this wiki to do it. But in the property sheet of instances of that class (in the GMF editor) the attribute is not shown. Is this the expected?

Also: Where I can find some tutorial/doc about adding support to edit the map entries(and to create/modify objects that are not represented in the diagram)?

Thanks for everything.
(Sorry if this question should be posted in the GMF sub-forum...)
Re: Editing maps in property sheets [message #1272869 is a reply to message #1272788] Wed, 19 March 2014 00:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ricardo,

Comments below.

On 18/03/2014 12:41 PM, Ricardo CaWal wrote:
> I'm developing a GMF editor and I need to model a certain attribute as
> a Map. I'm following
> https://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_create_a_Map_in_EMF.3F
> to do it. But in the property sheet of instances of that class (in the
> GMF editor) the attribute is not shown. Is this the expected?
Yes, that's expected. Map entries are essentially just contained
EObjects and are created using "New->" in a structured editor.
> Also: Where I can find some tutorial/doc about adding support to edit
> the map entries(and to create/modify objects that are not represented
> in the diagram)?
I imagine typically such editing could be done in the outline view, no?
>
> Thanks for everything. (Sorry if this question should be posted in the
> GMF sub-forum...)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Editing maps in property sheets [message #1273220 is a reply to message #1272869] Wed, 19 March 2014 18:41 Go to previous messageGo to next message
Ricardo \\\"CaWal\\\" Cacheta Waldemarin is currently offline Ricardo \\\"CaWal\\\" Cacheta WaldemarinFriend
Messages: 29
Registered: January 2013
Junior Member
Thank you, Ed! Comments below:

Quote:
>Is this the expected?
Yes, that's expected. Map entries are essentially just contained
EObjects and are created using "New->" in a structured editor.


Humm.. you're right... I can add those maps using the "New child..." action.
And seems that I also can show the attribute in the property sheet (by setting
"property type" to "editable" in the edit section of the class in Genmodel)
and let users select (existing) instances of the map to compound this attribute.
Quote:

I imagine typically such editing could be done in the outline view, no?

I'd tried your hint and you're right.
But, in this context (the GMF-based editor), it will be a bit counter-intuitive
for the users if I ask them to head to the outline view and add the map.
I think the best approach would be using the property sheet itself to set the attribute.

Maybe I could by setting "property type" to editable and try to extend the wizzard
that opens to edit it (bellow) to add an option to create a new map entry and to
edit this entry in the same window.

index.php/fa/17783/0/

Do you think it's a good approach (or that exists a better way to do it)?
Re: Editing maps in property sheets [message #1273356 is a reply to message #1273220] Wed, 19 March 2014 23:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ricardo,

Yes, making the containment reference an editable property and providing
a specialized property editor for editing the overall map is a
reasonable (and nice) approach.

On 19/03/2014 11:41 AM, Ricardo CaWal wrote:
> Thank you, Ed! Comments below:
>
> Quote:
>>> Is this the expected?
>> Yes, that's expected. Map entries are essentially just contained
>> EObjects and are created using "New->" in a structured editor.
>
> Humm.. you're right... I can add those maps using the "New child..." action.
> And seems that I also can show the attribute in the property sheet (by setting
> "property type" to "editable" in the edit section of the class in Genmodel)
> and let users select (existing) instances of the map to compound this attribute.
> Quote:
>> I imagine typically such editing could be done in the outline view, no?
> I'd tried your hint and you're right.
> But, in this context (the GMF-based editor), it will be a bit counter-intuitive
> for the users if I ask them to head to the outline view and add the map.
> I think the best approach would be using the property sheet itself to set the attribute.
>
> Maybe I could by setting "property type" to editable and try to extend the wizzard
> that opens to edit it (bellow) to add an option to create a new map entry and to
> edit this entry in the same window.
>
>
>
> Do you think it's a good approach (or that exists a better way to do it)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Editing maps in property sheets [message #1273882 is a reply to message #1273356] Thu, 20 March 2014 17:29 Go to previous message
Ricardo \\\"CaWal\\\" Cacheta Waldemarin is currently offline Ricardo \\\"CaWal\\\" Cacheta WaldemarinFriend
Messages: 29
Registered: January 2013
Junior Member
Thank you, Ed! I just found the EEF project. Maybe it'll help me on it. Wink
Previous Topic:Root element changed after saving model
Next Topic:Loading Enum from other ecore file
Goto Forum:
  


Current Time: Wed Apr 24 22:16:47 GMT 2024

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

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

Back to the top