ATL Plugin [message #898749] |
Fri, 27 July 2012 08:46  |
Eclipse User |
|
|
|
Hi,
I am using ATl plugin to lunch atl using java class.
Before i was running ATL files by using ATL configuration wizard.
The input i was giving in the configuration were:
ATL Module: sample.atl
Metamodel UML:sampleprofile.uml
Source Model system: samplemodel.uml
Target: output.uml
After running the output was the correct and the one i wanted.
The problem is that when i use the ATL plugin to lunch the atl files it only requires me as input:
Name of the ATL file and Name of the metamodel.
The main method in the java class generated is something like this:
public static void main(String[] args) {
try {
Model_CreateComponents runner = new Model_CreateComponents();
runner.loadModels("model\\sampleprofile.uml");
runner.doModel_CreateComponents(new NullProgressMonitor());
runner.saveModels("model\\output.uml");
} catch (ATLCoreException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ATLExecutionException e) {
e.printStackTrace();
}
}
the problem is that i dont know where to specify the samplemodel.uml. Because this should be also as input. Therefore the output.uml i am getting is not the one i am expecting to get.
Does anyone know how can i specify this second file inside the generated java class ?
Thank you in advance!
|
|
|
|
|
|
|
|
|
Re: ATL Plugin [message #901366 is a reply to message #900420] |
Sat, 11 August 2012 10:14   |
Eclipse User |
|
|
|
Hi Fernando,
Are you using the last version of Eclipse? (Juno version)
So, I know that you can use the ATL plugin in Juno version and in Indigo version. First, you need to install modelings tools go to help and then "install modeling components", search by ATL.
After it, go to windows, open perspective -> ATL
Then you'll be able to use atl plugin. To use it you'll need to have a ATL project, and then go to File, and select New -> ATL plugin.
So, I hope it can help you.
|
|
|
Re: ATL Plugin [message #987431 is a reply to message #901366] |
Mon, 26 November 2012 10:11  |
Eclipse User |
|
|
|
Hello.. I am facing this problem in running ATL plugin as a Java project.. Any help is appreciated. Thanks!
org.eclipse.m2m.atl.core.ATLCoreException: Error loading Model/HybridApproach_102412.uml: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/schemas/Standard/1' not found. (file:///C:/Users/owner/workspace/TestJavaAtlPlugin/Model/HybridApproach_102412.uml, 5320, 116)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at SysML4ArenaDemo.files.AtlScript.loadModels(AtlScript.java:126)
at SysML4ArenaDemo.files.AtlScript.main(AtlScript.java:81)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/schemas/Standard/1' not found. (file:///C:/Users/owner/workspace/TestJavaAtlPlugin/Model/HybridApproach_102412.uml, 5320, 116)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
... 3 more
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/schemas/Standard/1' not found. (file:///C:/Users/owner/workspace/TestJavaAtlPlugin/Model/HybridApproach_102412.uml, 5320, 116)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2591)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2422)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:169)
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.XMLNSDocumentScannerImpl.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.XMLNSDocumentScannerImpl.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 javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:242)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1290)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
... 5 more
|
|
|
Powered by
FUDForum. Page generated in 0.28801 seconds