Bug 398955 - [Pivot] Undesired custom implementation at ModuleImpl and ResolveExpImpl
Summary: [Pivot] Undesired custom implementation at ModuleImpl and ResolveExpImpl
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-01-24 05:02 EST by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2013-05-28 12:10 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-01-24 05:02:29 EST
Due to hand coded functionality in the generated classes for the OCL Pivot model, the code generation for QVTOperational MM produces code with compilation errors.

This bug is to track the issue and look for the best way to sort this out.
Comment 1 Adolfo Sanchez-Barbudo Herrera CLA 2013-01-24 05:05:38 EST
Concerning the ResolveExpImpl it seems that there is an unnecessary (not used even in the own class) public abstract method getReferredFeature at Pivot OCL::CallExpImpl
Comment 2 Ed Willink CLA 2013-01-24 07:56:07 EST
(In reply to comment #1)
CallExpImpl::getReferredFeature has no references and so can be safely deleted.

For now just return null or throw an exception just like AssociationCallassCallExp.
Comment 3 Adolfo Sanchez-Barbudo Herrera CLA 2013-01-25 13:08:36 EST
(In reply to comment #2)
> (In reply to comment #1)
> CallExpImpl::getReferredFeature has no references and so can be safely deleted.
> 
May I commit harmless changes to OCL code using QVTo bug issues ? 
Should I instead open bugzillas for the OCL Project ?
Can they also be committed to master (as long as they are harmless and related to examples.*) ?

Cheers,
Adolfo.
Comment 4 Ed Willink CLA 2013-01-25 13:33:16 EST
I'd prefer you to commit them to asbh/nnnnnn branches and I'll cherry pick them onto master after review/coordination with my changes.
Comment 5 Adolfo Sanchez-Barbudo Herrera CLA 2013-02-21 05:48:26 EST
Pivot CallExpImpl fixed at 257dde5eff9525982635e15680f04d74bb5d3d69 commit

ModuleImpl still pending.
Comment 6 Ed Willink CLA 2013-02-21 06:24:12 EST
The createXXX methods come from the standard MDT/UML2 genmodel technology. AFAIC they are never used, so the simplest solution may be to find the genmodel setting that controls them and switch them off.
Comment 7 Adolfo Sanchez-Barbudo Herrera CLA 2013-02-21 06:59:52 EST
Hi Ed, 
(In reply to comment #6)
> The createXXX methods come from the standard MDT/UML2 genmodel technology. AFAIC
> they are never used, so the simplest solution may be to find the genmodel
> setting that controls them and switch them off.

Perhaps, the solution is using the "MDT/UML2 genmodel technology" so that the implementation is correctly generated for ModuleImpl ;)

The following methods from DomainPackage need also implementation, currently hand-coded in the Pivot PackageImpl:

public EPackage getEPackage()
public PackageId getPackageId()

Fast solution: copy-paste. However, we know that there other smarter solutions, for instance, that one we have used to provide the accept methods implementation.

Cheers,
Adolfo.
Comment 8 Ed Willink CLA 2013-02-21 07:18:36 EST
(In reply to comment #7)
> Fast solution: copy-paste. However, we know that there other smarter
> solutions, for instance, that one we have used to provide the accept methods
> implementation.

Yes. Get the right solution manually today.

> Perhaps, the solution is using the "MDT/UML2 genmodel technology" so that
> the implementation is correctly generated for ModuleImpl ;)

Of course. One of my background activities is the UML+OCL to Pivot MM2MM transformation. Currently this goes direct to Pivot.ecore so cuts out all the UML2 complexities. Sure to solve the createXXXX problem too. [Four of my recent bug fixes were to get the UML 2.5 Beta XMI parsing again.]
Comment 9 Adolfo Sanchez-Barbudo Herrera CLA 2013-02-21 08:01:35 EST
(In reply to comment #8)
> 
> Yes. Get the right solution manually today.
> 

?. To me the right solution is not the manual one, but the generated one. Please, specify.
Comment 10 Ed Willink CLA 2013-02-21 08:45:22 EST
(In reply to comment #9)
> (In reply to comment #8)
> > 
> > Yes. Get the right solution manually today.
> > 
> 
> ?. To me the right solution is not the manual one, but the generated one.

Certainly.

> Please, specify.

But "today" manually is the right solution.

The final full automated solution may be months perhaps years away.
Comment 11 Adolfo Sanchez-Barbudo Herrera CLA 2013-02-22 12:06:03 EST
> 
> > Perhaps, the solution is using the "MDT/UML2 genmodel technology" so that
> > the implementation is correctly generated for ModuleImpl ;)
> 
> Of course. One of my background activities is the UML+OCL to Pivot MM2MM
> transformation. Currently this goes direct to Pivot.ecore so cuts out all the
> UML2 complexities. Sure to solve the createXXXX problem too. [Four of my recent
> bug fixes were to get the UML 2.5 Beta XMI parsing again.]

Meanwhile, I've been trying to use the "MDT/UML2 genmodel technology" to generate proper ModuleImpl for the QVTOperational.ecore MM. However, it's not as easy as saying to the genmodel that it must use the "org.eclipse.uml2.uml.ecore.importer". Would I need a QVTOperational.uml model ? I remember that for OCL we used to work with the UML model, then create the ecore one.

I have the impression that I could progress faster with some guidances about how to properly use this  "MDT/UML2 genmodel technology"... Any documentation or guidance is welcome.
Comment 12 Ed Willink CLA 2013-05-28 11:52:27 EDT
(In reply to comment #2)
> (In reply to comment #1)
> CallExpImpl::getReferredFeature has no references and so can be safely
> deleted.

getReferredFeature is no longer part of the Pivot API so any overloads in QVTo should be @Override errors.
Comment 13 Adolfo Sanchez-Barbudo Herrera CLA 2013-05-28 12:10:20 EDT
(In reply to comment #12)
> (In reply to comment #2)
> > (In reply to comment #1)
> > CallExpImpl::getReferredFeature has no references and so can be safely
> > deleted.
> 
> getReferredFeature is no longer part of the Pivot API so any overloads in
> QVTo should be @Override errors.

Yes, that was fixed time ago.

[I don't know when since I can't access per file GIT history as I did months ago, EGit is really annoying. If you have any trick to do that with recent versions, please, let me know it.]