Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Add Xtext editor in SWT/Swing java application
Add Xtext editor in SWT/Swing java application [message #1773394] Wed, 27 September 2017 11:37 Go to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
I want to use XText editor in a java application without the use of any Eclipse/IntelliJ IDEs. I found the option in the creation of a new XText project to create a "Generic IDE". Can this help me to integrate XText editor in a java application? If no, is it feasible to use Xtext editor in a Java application without making it an RCP/Plugin in Eclipse?
Re: Add Xtext editor in SWT/Swing java application [message #1773397 is a reply to message #1773394] Wed, 27 September 2017 11:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you can use the language server backend and the lsp4j frontend to talk to that.
or you have a look at the services they use and call them directly.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Add Xtext editor in SWT/Swing java application [message #1773400 is a reply to message #1773397] Wed, 27 September 2017 13:03 Go to previous messageGo to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Thanks alot for ur reply
I am totally new to the integration of Xtext and LSP4J.
Is it working cross platforms? and is it applicable for any language that can be implemented by the normal Xtext projects? I am sorry I have Xtext projects v 2.9 integrated with an RCP application with the whole grammar implemented and I just don't want to lose all the effort done. Can I reuse the grammar and the scoping,...etc features with the new integration of Xtext and LSP4J?

Re: Add Xtext editor in SWT/Swing java application [message #1773401 is a reply to message #1773400] Wed, 27 September 2017 13:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you need / should switch to xtext 2.12.
and yes in principle it works with every dsl. depending on your usecase you need to do additional work (e.g. when using xbase)

=> you can reuse everything you implemented inside yourdsl (runtime) and yourdsl2 (runtime) that does not use eclipse api
=> you dont need to change anything for that (i assume you are already on the new workflow/generator)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Maven Tycho Best Practice Template for Xtext DSL
Next Topic:IGrammarAccess cannot be resolved. It is indirectly access
Goto Forum:
  


Current Time: Fri Apr 19 21:00:43 GMT 2024

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

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

Back to the top