Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Export XMI
Export XMI [message #1723954] Fri, 19 February 2016 09:31 Go to next message
John Cole is currently offline John ColeFriend
Messages: 66
Registered: June 2013
Member
Hello,

I've developed my own language using Xtext. Then, in the generated Eclipse editor, I created a model, using my defined language.

Is not now possible, to export my model (not the Ecore-model) as XMI-file?
I know how to export the Ecore-Model, but not how to export my model, based on the language.

I would appreciate any help!
Re: Export XMI [message #1723959 is a reply to message #1723954] Fri, 19 February 2016 09:38 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
I guess this has been answered a couple of times in this newsgroup already Smile

1) Why would you want to do this? The XtextResource fulfills EMF's Resource contract (interface) and thus can be referenced and refer to all kinds of other EMF Resources in the same ResourceSet, based on XMI or whatever serialization format.
2) As Xtext linking is based on names and XMI linking is based on XMI ID's, you'd have to load *all* your models, resolve the links, move the contents of the XtextResources to new XMIResources and then save the new XMIResources.



---
Get professional support from the Xtext committers at www.typefox.io
Re: Export XMI [message #1723980 is a reply to message #1723959] Fri, 19 February 2016 12:12 Go to previous messageGo to next message
John Cole is currently offline John ColeFriend
Messages: 66
Registered: June 2013
Member
Jan,

thank you very much for the answer!

1) I need it, because my editor is used in an external workflow (batch mode) and using the XMI file could give me the opportunity to change its parameters on the fly and test the same model with different parameters.
2) Hm... Sounds difficult. Do you have an example? Unfortunately I can't find any similar questions through the forum search.

[Updated on: Fri, 19 February 2016 12:12]

Report message to a moderator

Re: Export XMI [message #1723983 is a reply to message #1723980] Fri, 19 February 2016 12:59 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
1) Sorry, I don't get it. Editor in batch mode? As long as you're processing your models with EMF, there is really no need to switch to a different persistence format. If run outside of Eclipse, just register your language to the EMF runtime using the <YourLanguage>StandaloneSetup
2) Search for XMI in this forum. You'll find e.g. https://www.eclipse.org/forums/index.php?t=msg&th=292631&goto=801725&#msg_801725



---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Am I using a good approach for creating a documentation formatter
Next Topic:Multiple icons for single entry in outline view
Goto Forum:
  


Current Time: Sun Oct 24 04:24:17 GMT 2021

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

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

Back to the top