Bug 409268 - [Pivot] Undesired custom implementation at VarParameterImpl
Summary: [Pivot] Undesired custom implementation at VarParameterImpl
Status: NEW
Alias: None
Product: QVTo
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 401424
  Show dependency tree
 
Reported: 2013-05-28 07:21 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2013-05-28 12:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Sanchez-Barbudo Herrera CLA 2013-05-28 07:21:48 EDT
Due to some alignment with OCL Pivot metamodel changes a new undesired custom implementation is required in the generated Impl classes.

OCL-Pivot TypedMultiplicityElement includes in its API a new (non-generated???????) isMany method.
The corresponding TypedMultiplicityElementImpl contains a hand-written implementation of such a method.

Due to multiple inheritance issues, VarParameterImpl is not completely auto-generated so it needs to "copy paste" the implementation from TypedMultiplicityElementImpl

This bug is simply created to track the issue, study it, and conclude how to better solve it. For the time being, the VarParameterImpl will include the manual implementation.

N.B: The suspicious API method needs discussion with Ed.
Comment 1 Ed Willink CLA 2013-05-28 11:48:17 EDT
Elimination of the double inheritance is only possible with an OMG meta-model change. But at the OMG-level (equivalent to the Ecore Java interfaces) multiple inheritance is no problem. So why should OMG change just to make Java toolsmiths happy?

Ecore happily auto-generates the multiples. Once the manual code is auto-generated from model specifications the problem may go away.
Comment 2 Adolfo Sanchez-Barbudo Herrera CLA 2013-05-28 11:59:09 EDT
> 
> Ecore happily auto-generates the multiples. Once the manual code is
> auto-generated from model specifications the problem may go away.

That's what I'd expect/want.

So far, the bug tracks the issue waiting for a completely autogenerated java classes for QVTo models.

More importantly is the my concern about that TypedMultiplicityElement.isMany java API method which looks like to be "hand coded" since doesn't have the corresponding @generated, which perhaps merits its own bugzilla, although I'm happy with discussion via this one.

Cheers,
Adolfo.
Comment 3 Ed Willink CLA 2013-05-28 12:15:18 EDT
The interesting Pivot *Impl classes currently average about 5 manual methods.

Now that the OCL code generation is better many of the distinctive methods can be coded in OCL.

That leaves accept, toString and perhaps getTypeId() for specialized codegen helpers.