|
Re: Extending an emf model & the generated editor? [message #391309 is a reply to message #391305] |
Wed, 23 February 2005 23:00 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Bryan,
Yeah, I've heard this problem described before, but never quite so well,
and with such good class names. ;-) The last time two times I heard it
I asked the folks to open a bugzilla feature request, but there still
isn't one so I'll ask again.
I'm not sure how we will fix this. It's like you would need to
generated an extended item provider adapter for Parent that would know
about NeedyChild. Your approach of defining a PatientParent effectively
forced this to happen, with the very unfortunate side effect of
introducing a new model object.
Bryan Hunt wrote:
> I have an emf model that extends another emf model, and the generated
> editor for the extending model does not behave as I would like.
>
> My base emf model contains two classes: Parent and Child. The Parent
> class has an EList of Child classes (children). My second emf model
> contains a single class: NeedyChild that extends (is a specialization
> of) Child. Given a Parent, i should be able to add instances of Child
> or NeedyChild to it's list of children.
>
> As expected the editor for the base project allows me to create a
> Parent and instances of Child, but not instances of NeedyChild.
>
> The generated editor for the project that contains the model with
> NeedyChild does not allow me to create a Parent, only NeedyChild.
>
> My workaround was to create a class in the same model as NeedyChild
> called PatientParent that extends Parent. When I use the generated
> editor, I can create an instance of PatientParent and add instances of
> Child and NeedyChild. From a modeling point of view, PatientParent is
> not needed as it provides no additional information.
>
> Is there something simple I'm missing with the generated editor that
> would allow me to create elements in a base model without having to
> extend the top level element as I have done with PatientParent? I'd
> really like to simply create an instance of Parent and be able to add
> instances of Child or NeedyChild.
>
> Bryan
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Extending an emf model & the generated editor? [message #758930 is a reply to message #391321] |
Fri, 25 November 2011 10:37 |
Eclipse User |
|
|
|
Am 24.02.2005 16:42, schrieb Bryan Hunt:
> Ask and ye shall receive:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=86481
>
> On 2005-02-23 17:00:54 -0600, Ed Merks <merks@ca.ibm.com> said:
>
>> Yeah, I've heard this problem described before, but never quite so
>> well, and with such good class names. ;-) The last time two times I
>> heard it I asked the folks to open a bugzilla feature request, but
>> there still isn't one so I'll ask again.
>
I had exactly the same problem, so I searched for something like
"Extending an emf model" and "generated editor" and found this
message...and was of course completely on the wrong track - took some
time to find out that this is solved since 2008 via "Child Creation
Extenders" and "Extensible Provider Factory"
- Just in case someone stumbles across this post
Thomas
|
|
|
|
Re: Extending an emf model & the generated editor? [message #759021 is a reply to message #758937] |
Fri, 25 November 2011 15:47 |
Eclipse User |
|
|
|
Am 25.11.2011 11:48, schrieb Ed Merks:
> roblem, so I searched for something like "Extending an emf model" and
> "generated editor" and found this message...and was of course completely
> on the wrong track - took some time to find out that this is solved
> since 2008 via "Child Creation Extenders" and "Extensible Provider Factory"
> - Just in case someone stumbles across this post
Thanks a lot, that is exactly what I need
|
|
|
Powered by
FUDForum. Page generated in 0.02426 seconds