Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Derived Attributes and Enumerators
[EEF] Derived Attributes and Enumerators [message #890668] Fri, 22 June 2012 20:08 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi guys,

Enjoying the new 1.1 drops. Two issues that I can't figure out:

1. How to make derived/read-only values show up on generated editors? I've got one in both properties edition and repository, but it doesn't actually show up.

2. How to make enums work properly? I've defined one and EEF makes it an EMFComboViewer, but it isn't populated with any values.

thanks,

Miles
Re: [EEF] Derived Attributes and Enumerators [message #890670 is a reply to message #890668] Fri, 22 June 2012 20:11 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
One other thing.. Smile

3. What's the best strategy for easily including in the same editor/view containments with cardinality 1-1. IOTW, If I have an EClass that contains exactly one other EClass and I want to include the contained EClass' attrbiutes in the parent ECLass views as if they were part of the same class. I can do this in code, but I'm wondering if there is a good way to do this using mostly the model.
Re: [EEF] Derived Attributes and Enumerators [message #892495 is a reply to message #890668] Thu, 28 June 2012 12:55 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Miles,



Le 22/06/2012 22:08, Miles Parker a écrit :
> Hi guys,
>
> Enjoying the new 1.1 drops. Two issues that I can't figure out:
>
> 1. How to make derived/read-only values show up on generated editors?
> I've got one in both properties edition and repository, but it doesn't
> actually show up.
>

Sorry but I'm not sure to understand your question. Can you explain me
more your problem ?

> 2. How to make enums work properly? I've defined one and EEF makes it an
> EMFComboViewer, but it isn't populated with any values.
>

EMFComboViewer should work without issue. I don't see how to help you
except be inviting you to enter in debug mode and see what's going wrong.

> thanks,
>

I'm sorry to not be more helpful :/

Regards

--
Goulwen

> Miles
Re: [EEF] Derived Attributes and Enumerators [message #892498 is a reply to message #890670] Thu, 28 June 2012 13:11 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Again :)

You can use SimpleModelNavigation to address your need. In a
PropertiesEditionElement you can create an SimpleModelNavigation that
let you define a reference to navigate before defining the
StructuralFeature in your EditionElement. For instance, if you have a
metamodel with an EClass "Person" having a containing feature typed
"Address" and an Address having an EAttribute "street", you can display
the street of a person in the EEF properties view.

To do that, create an PropertiesEditionElement "street" in the
PropertiesEditionComponent "Person". Create a SimpleModelNavigation in
this PropertiesEditionElement and set the "address" reference to its
"feature" refrence. Back to your street EditionElement, you can choose
the "street" attribute for your model reference. And the generation
takes care of this!

For the moment, the limitation of this system is the need to have the
"Address" in the Person. If there is no address, EEF will throw an
Exception. I'm currently working on a "Smartest" ModelNavigation able to
create element.

Hoping it can help you :)

--
Goulwen


Le 22/06/2012 22:11, Miles Parker a écrit :
> One other thing.. :)
>
> 3. What's the best strategy for easily including in the same editor/view
> containments with cardinality 1-1. IOTW, If I have an EClass that
> contains exactly one other EClass and I want to include the contained
> EClass' attrbiutes in the parent ECLass views as if they were part of
> the same class. I can do this in code, but I'm wondering if there is a
> good way to do this using mostly the model.
Re: [EEF] Derived Attributes and Enumerators [message #893451 is a reply to message #892498] Wed, 04 July 2012 08:17 Go to previous message
aurelien didier is currently offline aurelien didierFriend
Messages: 11
Registered: June 2012
Junior Member
Hi guys,

Goulwen Le Fur wrote on Thu, 28 June 2012 09:11


You can use SimpleModelNavigation to address your need. In a
PropertiesEditionElement you can create an SimpleModelNavigation that
let you define a reference to navigate before defining the
StructuralFeature in your EditionElement. For instance, if you have a
metamodel with an EClass "Person" having a containing feature typed
"Address" and an Address having an EAttribute "street", you can display
the street of a person in the EEF properties view.

To do that, create an PropertiesEditionElement "street" in the
PropertiesEditionComponent "Person". Create a SimpleModelNavigation in
this PropertiesEditionElement and set the "address" reference to its
"feature" refrence. Back to your street EditionElement, you can choose
the "street" attribute for your model reference. And the generation
takes care of this!


Thanks for the advice.

Goulwen Le Fur wrote on Thu, 28 June 2012 09:11

For the moment, the limitation of this system is the need to have the
"Address" in the Person. If there is no address, EEF will throw an
Exception. I'm currently working on a "Smartest" ModelNavigation able to
create element.


So, until your next release, the best way to create element is to add a CustomModelNavigation and to complete code generation?
Plus, I found myself wondering, in which case do we use ChainedModelNavigation, I haven't find any exemple or discusion about that, so if someone can give me a clear exemple as the example of Goulwen for SimpleModelNavigation, it would be perfect.

Thanks,

Aurélien
Previous Topic:Hibernate tool for JUNO
Next Topic:[EEF] Linking EEF Property Sheet with GMF Editor
Goto Forum:
  


Current Time: Fri Apr 26 11:42:11 GMT 2024

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

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

Back to the top