Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Plugin
ATL Plugin [message #898749] Fri, 27 July 2012 08:46 Go to next message
MeJ MeJ is currently offline MeJ MeJ
Messages: 9
Registered: July 2012
Junior Member
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 #898752 is a reply to message #898749] Fri, 27 July 2012 08:55 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar Arndt
Messages: 57
Registered: June 2012
Member
Hi Mej,

sorry I can't help you right now, but could you post a bit more of your code? I'm curious, especially of the imports, as I'm currently trying the same thing. Thank you!
Re: ATL Plugin [message #898755 is a reply to message #898752] Fri, 27 July 2012 08:59 Go to previous messageGo to next message
MeJ MeJ is currently offline MeJ MeJ
Messages: 9
Registered: July 2012
Junior Member
I didnt create anything by hand. If you use the ATL plugin and you choose an atl file and also a metamodel as input it creates automatically a java class for yr ATL file and also a .properties file. There you have to specify the correct url to your inputs.
just have a look to the last part of this link
http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Tools

[Updated on: Fri, 27 July 2012 09:00]

Report message to a moderator

Re: ATL Plugin [message #898761 is a reply to message #898755] Fri, 27 July 2012 09:20 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar Arndt
Messages: 57
Registered: June 2012
Member
Thank you once more - I should have noticed that earlier.
Re: ATL Plugin [message #898768 is a reply to message #898761] Fri, 27 July 2012 09:50 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.
Messages: 64
Registered: May 2012
Member
Hi Mej,

Did you could run it without one of this models?

I'm getting some problems when I'm trying to run a ATL plugin using UML files.

Thanks
Re: ATL Plugin [message #898780 is a reply to message #898749] Fri, 27 July 2012 10:22 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar Arndt
Messages: 57
Registered: June 2012
Member
MeJ, there is a message in the generated class' main method which tells you in which order to pass the models' URIs:
if (args.length < 3) {
	System.out.println("Arguments not valid : {IN_model_path, OUT_model_path, hmi_model_path}.");
} else {

}


I call it like this in a model with one input model ('IN') and two output models ('OUT' and 'hmi'):
GeneratedAtlPluginClass.main(new String[] {
	URI.createFileURI(inputFile.getPath()).toString(),
	URI.createFileURI(outputFile1.getPath()).toString(),
	URI.createFileURI(outputFile2.getPath()).toString() });

It works just fine, thanks to your hint - I'd be glad if could return the favor.
Re: ATL Plugin [message #900420 is a reply to message #898780] Mon, 06 August 2012 21:46 Go to previous messageGo to next message
Fernando Gonzalez is currently offline Fernando Gonzalez
Messages: 3
Registered: July 2012
Junior Member
I would like to use the ATL plugin but I haven't been able to find a place to download it since I guess my Eclipse doesn't have it.

Could someone tell me which menu option takes you to the screen to use the ATL plugin as the documentation says ?
Re: ATL Plugin [message #901366 is a reply to message #900420] Sat, 11 August 2012 10:14 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.
Messages: 64
Registered: May 2012
Member
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 Go to previous message
Ola Missing name is currently offline Ola Missing name
Messages: 9
Registered: January 2011
Junior Member
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
Previous Topic:Executing ATL transformation programatically issue
Next Topic:ATL plugin in Eclipse
Goto Forum:
  


Current Time: Sat Apr 19 18:42:33 EDT 2014

Powered by FUDForum. Page generated in 0.21419 seconds