Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how to access emfmodel in xmi
how to access emfmodel in xmi [message #907468] Tue, 04 September 2012 04:15 Go to next message
noi poi is currently offline noi poiFriend
Messages: 29
Registered: June 2012
Junior Member
Hey there!

I need to access emf model which is shown in tree structure for ATL transformation. The emf model is generated from TEXTBE tool whose language is made in emftext. Now the the TEXTBE tool takes textual input and as a result shows the tree like structure of the model but i am unable to find its xmi dialect.

How can i access xmi model ??

ANy help

Naurin
Re: how to access emfmodel in xmi [message #907474 is a reply to message #907468] Tue, 04 September 2012 04:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Please read overview paper's section on saving and loading resources:

http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.html

On 04/09/2012 6:15 AM, noi poi wrote:
> Hey there!
>
> I need to access emf model which is shown in tree structure for ATL
> transformation. The emf model is generated from TEXTBE tool whose
> language is made in emftext. Now the the TEXTBE tool takes textual
> input and as a result shows the tree like structure of the model but i
> am unable to find its xmi dialect.
>
> How can i access xmi model ??
>
> ANy help
>
> Naurin


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: how to access emfmodel in xmi [message #908028 is a reply to message #907468] Tue, 04 September 2012 15:07 Go to previous messageGo to next message
noi poi is currently offline noi poiFriend
Messages: 29
Registered: June 2012
Junior Member
Hey Ed,

This is confusing. I mean what's the point of developing a texual editor when you have to enter model instances manually........

The TextBe is a texual editor which uses model transformation at its core to display the graphical counterpart of the lanugage.

ITs is an Eclipse plugin which utilises several Eclipse plugins: the Eclipse Modeling Framework (EMF), EMFText, EclipseGraphviz, the ATLAS Transformation Language (ATL), Java Emitter Templates (JET) and SVG Eclipse.

The textual representation is parsed by an editor generated from a textual specification provided to EMFText. EMFText populates a model that conforms to the metamodel of the appropriate view. An ATL transformation then maps the view into a graphviz model and a JET template is used to generate the associated code.

Now i need to access that model which is populated by the EMFText and write a transformation in ATL that maps it to my target metamodel.
I know the source metamodel
I know the target metamodel
What i dont know is what path to give in the ATL configuration for the source populated model instance. And since ATL only takes in source instance model in xmi format, i am interested in it.
since i am new to the eclipse community i hope you would answer my trivial questions.


Thanks,
Naurin
Re: how to access emfmodel in xmi [message #908040 is a reply to message #908028] Tue, 04 September 2012 15:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Comments below.

On 04/09/2012 5:07 PM, noi poi wrote:
> Hey Ed,
>
> This is confusing. I mean what's the point of developing a texual
> editor when you have to enter model instances manually........
Whether the resource contains text, XML, or whatever, the same
mechanisms are used.
>
> The TextBe is a texual editor which uses model transformation at its
> core to display the graphical counterpart of the lanugage.
I know nothing about that, so I can't answer questions about it.
>
> ITs is an Eclipse plugin which utilises several Eclipse plugins: the
> Eclipse Modeling Framework (EMF), EMFText, EclipseGraphviz, the ATLAS
> Transformation Language (ATL), Java Emitter Templates (JET) and SVG
> Eclipse.
Some of those I know, and some I don't.
>
> The textual representation is parsed by an editor generated from a
> textual specification provided to EMFText. EMFText populates a model
> that conforms to the metamodel of the appropriate view.
Likely using EMF's resource framework.
> An ATL transformation then maps the view into a graphviz model and a
> JET template is used to generate the associated code.
I see.
>
> Now i need to access that model which is populated by the EMFText and
> write a transformation in ATL that maps it to my target metamodel. I
> know the source metamodel
> I know the target metamodel
> What i dont know is what path to give in the ATL configuration
That's an ATL question, not an EMF one.
> for the source populated model instance. And since ATL only takes in
> source instance model in xmi format, i am interested in it.
I don't think that's true. I think it will use EMF to load a resource
for the specified URI and you can register a resource factory for
dealing with URIs of that form, e.g., register a factory based on
extension, and then the resource will be loaded by the right
implementation that can read the appropriate format.
> since i am new to the eclipse community i hope you would answer my
> trivial questions.
Yes, but I would hope that you read some basic reference material that I
suggest and not come back and explain how pointless it is. You'll need
to learn about resource set, resource, and so on. There's a nice book
you can buy. But if you come and say "I no nothing, please explain
everything to me" that's just not going to work well.
>
>
> Thanks,
> Naurin


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:What are the options for headless EMF tasks?
Next Topic:[CDO] Editing lazy loaded objects
Goto Forum:
  


Current Time: Fri Apr 26 20:26:09 GMT 2024

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

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

Back to the top