Skip to main content



      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] Mon, 02 December 2019 19:43 Go to next message
Eclipse UserFriend
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 09:43 Go to previous messageGo to next message
Eclipse UserFriend
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 11:19 Go to previous messageGo to next message
Eclipse UserFriend
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"
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 12:09 Go to previous messageGo to next message
Eclipse UserFriend
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 12:21 Go to previous messageGo to next message
Eclipse UserFriend
You may use the following article as starting point https://www.eclipse.org/articles/Article-Java-launch/launching-java.html
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 14:50 Go to previous message
Eclipse UserFriend
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: Thu Jul 17 13:35:20 EDT 2025

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

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

Back to the top