Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AM3 » Error while compiling AM3 plugin EMFModelFactory.java
Error while compiling AM3 plugin EMFModelFactory.java [message #768088] Mon, 19 December 2011 15:00 Go to next message
Sangeeta Tripathy is currently offline Sangeeta TripathyFriend
Messages: 16
Registered: December 2011
Junior Member
Hi,
I get the following error when I compile the source code of plugin EMFModelFactory.java in the package org.eclipse.am3.moscript.core.emf.

Error: "The method setResource(Resource) from type EMFModel is not visible"
at the code: model.setResource(builtin)

The class extends org.eclipse.m2m.atl.core.emf.EMFReferenceModel.

I am not able to get past this error, please help me out.

Thanks.


[Updated on: Mon, 19 December 2011 15:04]

Report message to a moderator

Re: Error while compiling AM3 plugin EMFModelFactory.java [message #768094 is a reply to message #768088] Mon, 19 December 2011 15:17 Go to previous messageGo to next message
Wolfgang Kling is currently offline Wolfgang KlingFriend
Messages: 4
Registered: December 2011
Junior Member
Hello Sangee, if you are planning to use MoScript with AM3 you have to follow the instructions in this link h t t p ://wiki.eclipse.org/MoScript if not, just do not checkout the packages containing the word "moscript" in their name.
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #768098 is a reply to message #768088] Mon, 19 December 2011 15:18 Go to previous messageGo to next message
Wolfgang Kling is currently offline Wolfgang KlingFriend
Messages: 4
Registered: December 2011
Junior Member
Hello Sangee, if you are planning to use MoScript with AM3 you have to follow the instructions in this link wiki.eclipse.org/MoScript

If not, just do not checkout the packages containing the word "moscript" in their name.
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #768246 is a reply to message #768098] Mon, 19 December 2011 20:08 Go to previous messageGo to next message
Sangeeta Tripathy is currently offline Sangeeta TripathyFriend
Messages: 16
Registered: December 2011
Junior Member
Wolfgang,
Thanks.
I have successfully compiled all the source code for AM3 plugins, (excluding MOScript). But when I install the plugins and restart Eclipse in AM3 perspective, I do not see the Injection option when I right-click on an XML file. I have installed AM3 mainly for XML injection and extraction. I have Eclipse Helios RC3 with ATL. How do I get this to work?

-Sangeeta
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #768541 is a reply to message #768246] Tue, 20 December 2011 10:35 Go to previous messageGo to next message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi,

As I told you in a previous thread, you could have installed only the plugin containing the XML projector (org.eclipse.m2m.atl.projectors.xml) because it depends only of ATL. But if you have installed the whole AM3 plugins it's ok.

It's not integrated with the GUI, you should launch it using the ATL ANT tasks, which is the standard way to work with injectors in ATL. Here is the link to the documentation:
http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Tools#Task_atl.loadModel

You should write something like that for your load model task:
  <atl.loadModel modelHandler="EMF" name="XML" metamodel="MOF" path="metamodels/XML.ecore" />
  <atl.loadModel name="myXML" metamodel="XML" path="inputs/MySample.xml">
     <injector name="XML" />
  </atl.loadModel>


Regards,

Guillaume

PS: The complete discussion we add on this topic could have been done in only one forum thread. It's easier to remember the story of what peoples want to do. Moreover it's not because you don't have an answer during the afternoon that you need to open a second topic for the same thing.
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #768929 is a reply to message #768541] Wed, 21 December 2011 04:27 Go to previous messageGo to next message
Sangeeta Tripathy is currently offline Sangeeta TripathyFriend
Messages: 16
Registered: December 2011
Junior Member
Thanks, and sorry for the multiple threads.
As I understand, I require only XML projector plugin to use XML injection/extraction. Besides Ant, can I also invoke using a Java program?
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #769045 is a reply to message #768929] Wed, 21 December 2011 10:01 Go to previous messageGo to next message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi,

Yes, that's it.

Launching ATL with a Java program is possible, you should look at the developer documentation:
http://wiki.eclipse.org/ATL/Developer_Guide

If you have questions about this, I suppose it's better to ask them directly on the m2m forum with the ATL tag (http://www.eclipse.org/forums/index.php/f/23/)

Regards,

Guillaume
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #773793 is a reply to message #769045] Mon, 02 January 2012 14:56 Go to previous messageGo to next message
Sangeeta Tripathy is currently offline Sangeeta TripathyFriend
Messages: 16
Registered: December 2011
Junior Member
I am invoking the XML injection (XMLInjector) using Java code to convert an XML file to XMI. It seems to be working without errors, but how can I access(read) the injected model (XMI)?
I would need to read it in order to write the ATL rules for transformation.
Please guide me.
Re: Error while compiling AM3 plugin EMFModelFactory.java [message #774116 is a reply to message #773793] Tue, 03 January 2012 09:47 Go to previous message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi,

The XML injection create a model conform to this XML metamodel:
http://www.emn.fr/z-info/atlanmod/index.php/Ecore#XML_1.1

Once you have the XML model you should translate it into your metamodel using a standard ATL transformation.

Regards,

Guillaume
Previous Topic:Problem running new AM3 plugins
Next Topic:example ATL Transformation don't work
Goto Forum:
  


Current Time: Sat Dec 20 12:16:52 GMT 2014

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

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