Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » GMF Transformation(How to register the GMF Resource for a programmatically called transformation.)
GMF Transformation [message #901586] Mon, 13 August 2012 14:35
Stefan L is currently offline Stefan LFriend
Messages: 13
Registered: July 2012
Junior Member
Hi,

I was trying to put my hands on a transformation considering the Graphical Modeling Framework (GMF). I built the UML models with Papyrus and already transformed the UML files. Now that I would like to add a graphical view to these models, I have to generate/transform the *.notation/*.di files.

I already did a lot of research, but couldn't really find useful hints regarding the registration of the GMFGenModel for my programmatically launched ATL configuration. This should be similar to the UML task, but when I try to load the *.notation file from my source model into an ASMModel, I get an exception:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Class 'Diagram' is not found or is abstract.
...
Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Diagram' is not found or is abstract.

at the line:
ASMModel model_IN = ml.loadModel("IN", metamodel_notation, new FileInputStream(uri.toString()));


I'm not completely sure, but I thought it has something to do with trying to cast the GMF Resource to EMF at the beginning in my file:
// gmf registration
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/gmf/runtime/1.0.2/notation", GMFGenPackage.eINSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("notation", new GMFGenFactoryImpl());
// uml registration
EPackage.Registry.INSTANCE.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);


Maybe someone has tried such similar transformation before. I would appreciate any help on this issue.

Regards
Stefan

[Updated on: Mon, 13 August 2012 14:48]

Report message to a moderator

Previous Topic:Assigning to a xs:any/EFeatureMapEntry with ATL
Next Topic:Determine if an unsettable attribute 'isSet'
Goto Forum:
  


Current Time: Fri Dec 19 13:10:03 GMT 2014

Powered by FUDForum. Page generated in 0.53492 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software