Acceleo [ Run problem] [message #1829077] |
Wed, 24 June 2020 19:46 |
Sel ma Messages: 16 Registered: June 2020 |
Junior Member |
|
|
Hello all,
I am new to Accelo and I need urgent guidance
1. First,I have created my DSL metamodel ( pfe.ecore) and then I generated the java classes of this metamodel using Accelo based on the. Ecore[I got .java file for each class of my metamodel] _the name of the Accelo project is MyTransformationM2T workspace image 1st attachment attachment 4 for the project
2. Second, I have created Sirius graphical model (MyPfe.pfe)based on my DSL on Eclipse Run time that contains the diagram (VLC) that I want to generate its java code, for that 2nd attachment , I have created another Acceleo project in the workplace(org.eclipse.aceleo.sirius) and then I have imported in this project the file( MyPfe.pfe and the newDiagrams.aid ) 3rd attachment
Now I want just to make sure I am on the right path before going further, I wrote some text in the file generate.mtl see attachment 3 of (org.eclipse.aceleo.sirius attatchemet 4) project and I launch an Accelo run configuration with two options :
1st option As an URL model /org.eclipse.acceleo.sirius/MyPfe.pfe
just after, I got a run error :
org.eclipse.acceleo.engine.AcceleoEvaluationException: Couldn't evaluate URL of the file at line 7 in Module generate for block file(anInteractionSpatiale.name, false, 'UTF-8'). Last recorded value of self was org.eclipse.sirius.sample.pfe.impl.InteractionSpatialeImpl@7674b62c (name: null).
at generate.generateElement(InteractionSpatiale)(generate.mtl:7)
at generate.generateElement(InteractionSpatiale)(generate.mtl:5)
2nd option
But If I sure the URL in the Model /org.eclipse.acceleo.sirius/newDiagrams.aird I got the error of :
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/sirius/diagram/description/1.1.0' not found. (file:/C:/Users/ABL/Desktop/PFE/ObeoDesigner-Community/workspace/org.eclipse.acceleo.sirius/newDiagrams.aird, 10, 247)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:488)
at org.eclipse.acceleo.sirius.main.Generate.<init>(Generate.java:91)
at org.eclipse.acceleo.sirius.main.Generate.main(Generate.java:145)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/sirius/diagram/description/1.1.0' not found. (file:/C:/Users/ABL/Desktop/PFE/ObeoDesigner-Community/workspace/org.eclipse.acceleo.sirius/newDiagrams.aird, 10, 247)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2643)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2476)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2126)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2085)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:151)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1894)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1048)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:82)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1026)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:720)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:190)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 6 more
So, My questions :
1. I get confused which URL Model to use in the Accelo run configuration: either /org.eclipse.acceleo.sirius/MyPfe.pfe or /org.eclipse.acceleo.sirius/newDiagrams.aird
2. Do I need to generate the java classes of my metamodel before I generate the code of the graphical diagram as I did ? -I thought I will use them as Datatypes for my code.
3. How can I generate the java code of the graphical diagram VLC using Accelo?
Regards. Selma
[Updated on: Thu, 25 June 2020 19:47] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03634 seconds