Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Using xtext as third party(Using xtext as third party)
Using xtext as third party [message #989076] Tue, 04 December 2012 14:35 Go to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
I want to use my xtext app as an external jar.
in order to validate a file that should be in my dsl language.

1) i don't know how to load the file to my jar. how should the dsl acknowledge the file i order to parse it?
2) any suggestions about the process?


thanks,
dana
Re: Using xtext as third party [message #989090 is a reply to message #989076] Tue, 04 December 2012 15:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14677
Registered: July 2009
Senior Member
Hi I am not sure what you want to do. Where is the file you are
talking about and what do you want to do with it?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Using xtext as third party [message #989098 is a reply to message #989090] Tue, 04 December 2012 15:31 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
Hi thank you for the quick response!

I have the xtext project that until now i would run it as a plug in.

now i want to create a new project (Main.java) using and import the jar file of the xtext
and by giving the new project (Main.java) a file path string it will run the dsl and check if the file corresponding to the language rules.

how do i combine the xtext so it will go over the file like it did in the plug in?
Re: Using xtext as third party [message #989111 is a reply to message #989098] Tue, 04 December 2012 16:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14677
Registered: July 2009
Senior Member
Hi you may set the generatejavamain in the codegeneratorfragment to
true to get such a main generated (at least as starting point)

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Using xtext as third party [message #989206 is a reply to message #989111] Wed, 05 December 2012 08:51 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
bit lost you, but thanks anyway Smile
Re: Using xtext as third party [message #989214 is a reply to message #989206] Wed, 05 December 2012 09:09 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14677
Registered: July 2009
Senior Member
so does it work or doesnt it?

i asked you to open the workflow and edit the generatorfragment and set
generateJavaMain = true

=> you will get a java main that reads the model.
alternatively:

http://wiki.eclipse.org/Xtext/FAQ#How_do_I_load_my_model_in_a_standalone_Java_application.C2.A0.3F


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Error parsing model files in Linux
Next Topic:Escape new line in Xtend
Goto Forum:
  


Current Time: Tue May 14 13:47:31 GMT 2024

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

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

Back to the top