Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[qvto-dev] Review bug 537041

Hi everybody

 

Branch cgerking/537041 contains a proposal to improve the internal quality of QVTo (no new features introduced). The patch gets rid of custom URI-Resource maps that are currently used to defend against metamodel schizophrenia when loading input/meta models. Simple reuse of ResourceSets does the trick as well, and seems much more elegant. In fact, the current code even parses XML files to check if a metamodel is being loaded, which is dirty. A known regression (at least compared to the current codebase) is a transformation like this:

 

modeltype Ecore uses 'http://www.eclipse.org/emf/2002/Ecore';

 

transformation ReloadingMetamodelAsInput(in e : Ecore);

 

main() {

                var c1 = e.objectsOfType(EClass)->selectOne(name = "EPackage");

               var c2 = EPackage.oclAsType(EClass);

               assert fatal (c1 = c2);

}

 

If we run this transformation with "platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore" as input, the assertion will fail because Ecore gets loaded twice. Running with “http://www.eclipse.org/emf/2002/Ecore” will work correctly, though. To me that’s not a regression at all because using a platform:/plugin URI to load a registered metamodel is the user’s failure.

 

Sergey, what do you think? Please review if possible.

 

 

Kind regards

Christopher

 

________________________________________________

 

Christopher Gerking, M. Sc.

 

Heinz Nixdorf Institut

Universität Paderborn

Softwaretechnik

Fürstenallee 11

33102 Paderborn

 

Telefon:    +49 (0) 52 51 / 60 65 72

Telefax:    +49 (0) 52 51 / 60 65 65

www.hni.upb.de/swt

________________________________________________

 


Back to the top