Multiple Inheritance: select which Impl java class will be used as superclass [message #478300] |
Mon, 13 April 2009 10:30  |
Eclipse User |
|
|
|
Hello all,
I have a class (CustomElement) that inherits from PackageElement and from
one of my classes (BaseCustomElement). When CustomElementImpl is
generated, it has PackageableElement as superclass. Is there a way to
instruct the generator to use BaseCustomElementImplo as superclass?
Thanks in advance.
Best regards,
Cristi.
|
|
|
|
|
Re: Multiple Inheritance: select which Impl java class will be used as superclass [message #478323 is a reply to message #478300] |
Thu, 23 April 2009 15:15  |
Eclipse User |
|
|
|
Cristian,
If to set a keyword of "extend" on a generalization using
Element#addKeyword(String), the general class will become the base
superclass when the UML model is converted to Ecore.
Kenn
"Cristian " <cristian607@yahoo.com> wrote in message
news:c97ef971080974a5deacb5743bc80dbe$1@www.eclipse.org...
> Hello all,
>
> I have a class (CustomElement) that inherits from PackageElement and from
> one of my classes (BaseCustomElement). When CustomElementImpl is
> generated, it has PackageableElement as superclass. Is there a way to
> instruct the generator to use BaseCustomElementImplo as superclass?
>
> Thanks in advance.
> Best regards,
> Cristi.
>
|
|
|
Re: Multiple Inheritance: select which Impl java class will be used as superclass [message #627495 is a reply to message #478300] |
Wed, 15 April 2009 11:27  |
Eclipse User |
|
|
|
Hi Cristian,
If you change the order of the ESuper Types in the ecore representation of
CustomElement such that BaseCustomElement appears first then it should work.
Select the 'CustomElement' in the tree view, then from the properties view
select 'ESuper Types' field. Use the 'Up' & 'Down' keys from the property
dialog to change the order.
Cheers,
- James.
"Cristian " <cristian607@yahoo.com> wrote in message
news:c97ef971080974a5deacb5743bc80dbe$1@www.eclipse.org...
> Hello all,
>
> I have a class (CustomElement) that inherits from PackageElement and from
> one of my classes (BaseCustomElement). When CustomElementImpl is
> generated, it has PackageableElement as superclass. Is there a way to
> instruct the generator to use BaseCustomElementImplo as superclass?
>
> Thanks in advance.
> Best regards,
> Cristi.
>
|
|
|
Re: Multiple Inheritance: select which Impl java class will be used as superclass [message #627496 is a reply to message #478305] |
Wed, 15 April 2009 11:34  |
Eclipse User |
|
|
|
.... from the .uml model, you can reorder your generalizations such that the
one for BaseCustomElement appears first using drag/drop in the tree editor.
When it comes time to convert the .uml model to .ecore, you will see an
option labeled 'Super Class Order'. Simply choose either 'ignore' or
'report' but *not* 'process'. If you choose 'process' it may reorder the
superclass order to optimize for code generation.
- James.
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:gs4u7f$959$1@build.eclipse.org...
> Hi Cristian,
>
> If you change the order of the ESuper Types in the ecore representation of
> CustomElement such that BaseCustomElement appears first then it should
> work.
> Select the 'CustomElement' in the tree view, then from the properties view
> select 'ESuper Types' field. Use the 'Up' & 'Down' keys from the
> property dialog to change the order.
>
> Cheers,
> - James.
>
> "Cristian " <cristian607@yahoo.com> wrote in message
> news:c97ef971080974a5deacb5743bc80dbe$1@www.eclipse.org...
>> Hello all,
>>
>> I have a class (CustomElement) that inherits from PackageElement and from
>> one of my classes (BaseCustomElement). When CustomElementImpl is
>> generated, it has PackageableElement as superclass. Is there a way to
>> instruct the generator to use BaseCustomElementImplo as superclass?
>>
>> Thanks in advance.
>> Best regards,
>> Cristi.
>>
>
>
|
|
|
Re: Multiple Inheritance: select which Impl java class will be used as superclass [message #627512 is a reply to message #478300] |
Thu, 23 April 2009 15:15  |
Eclipse User |
|
|
|
Cristian,
If to set a keyword of "extend" on a generalization using
Element#addKeyword(String), the general class will become the base
superclass when the UML model is converted to Ecore.
Kenn
"Cristian " <cristian607@yahoo.com> wrote in message
news:c97ef971080974a5deacb5743bc80dbe$1@www.eclipse.org...
> Hello all,
>
> I have a class (CustomElement) that inherits from PackageElement and from
> one of my classes (BaseCustomElement). When CustomElementImpl is
> generated, it has PackageableElement as superclass. Is there a way to
> instruct the generator to use BaseCustomElementImplo as superclass?
>
> Thanks in advance.
> Best regards,
> Cristi.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04778 seconds