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 09:35 Go to next message
Dana Klein is currently offline Dana Klein
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 10:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
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
Re: Using xtext as third party [message #989098 is a reply to message #989090] Tue, 04 December 2012 10:31 Go to previous messageGo to next message
Dana Klein is currently offline Dana Klein
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 11:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
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
Re: Using xtext as third party [message #989206 is a reply to message #989111] Wed, 05 December 2012 03:51 Go to previous messageGo to next message
Dana Klein is currently offline Dana Klein
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 04:09 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
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
Previous Topic:Support of semantic predicates
Next Topic:Escape new line in Xtend
Goto Forum:
  


Current Time: Fri Jul 25 19:06:39 EDT 2014

Powered by FUDForum. Page generated in 0.02962 seconds