Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to run a java main class in an environment created with Xtext(I wrote a DSL using Xtext specification for a school project, and i need to run a java file inside this environment using a button )
How to run a java main class in an environment created with Xtext [message #1817908] Tue, 03 December 2019 00:43 Go to next message
MAHDI MOUATTA is currently offline MAHDI MOUATTAFriend
Messages: 3
Registered: December 2019
Junior Member
I wrote a DSL using Xtext specification for a school project, and i need to run a java file inside this environment using a button .

I managed to create the button but i still don't know how to access the file in the new environment, and then how to run it.
Re: How to run a java main class in an environment created with Xtext [message #1817954 is a reply to message #1817908] Tue, 03 December 2019 14:43 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 114
Registered: February 2016
Senior Member
You can find an example for that in the blog of Christian: https://www.dietrich-it.de/xtext/2011/10/15/xtext-calling-the-generator-from-a-context-menu.html
Re: How to run a java main class in an environment created with Xtext [message #1817963 is a reply to message #1817954] Tue, 03 December 2019 16:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
hi, i am not sure how this question is Xtext related.
could you elaborate what you mean by

"run a java file inside this environment"


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to run a java main class in an environment created with Xtext [message #1817968 is a reply to message #1817963] Tue, 03 December 2019 17:09 Go to previous messageGo to next message
MAHDI MOUATTA is currently offline MAHDI MOUATTAFriend
Messages: 3
Registered: December 2019
Junior Member
I am new to this, but I will do my best to explain to you what I want to do.
I created a DSL(Global constraints written in a certain format), after that I want to use the file created based on these DSL rules, in the new eclipse application environment , as an input to my java application.
I managed to do so but I want to run the main class using a UI button, is that possible ? if so how can I configure it ?

Re: How to run a java main class in an environment created with Xtext [message #1817971 is a reply to message #1817968] Tue, 03 December 2019 17:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13637
Registered: July 2009
Senior Member
You may use the following article as starting point https://www.eclipse.org/articles/Article-Java-launch/launching-java.html

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to run a java main class in an environment created with Xtext [message #1817979 is a reply to message #1817971] Tue, 03 December 2019 19:50 Go to previous message
MAHDI MOUATTA is currently offline MAHDI MOUATTAFriend
Messages: 3
Registered: December 2019
Junior Member
Thank you, that helped a bit, but I still don't know where to put these configurations so that I can access them in the new eclipse application launched.
PS : as I mentioned before, I created a button and I linked it with a class that extends AbstractHandler and implements IHandler.
Previous Topic:Extending scope with dynamic references
Next Topic:Xtext/Xcore/Tycho dependencies
Goto Forum:
  


Current Time: Sun Oct 25 03:26:08 GMT 2020

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

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

Back to the top