[SOLVED] Porting project from xtext plugin to xtext lsp server [message #1826982] |
Tue, 05 May 2020 12:18  |
Eclipse User |
|
|
|
Hi guys, I've got an xtext project that atm is builded and used as Eclipse plugin.
Hearing that xtext supports language server protocol I would like to try and use it.
Unfortunately, as per the docs, i need to build the project using Gradle and to enable gradle I need to create an xtext project without the "Plugin functionalities"
Here is my question: "Since the project is huge is there some official way, I don't know, maybe an export and import" to duplicate the project but using gradle and removing all "eclipse plugin" related code?
Thanks.
[Updated on: Wed, 06 May 2020 10:23] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: Porting project from xtext plugin to xtext lsp server [message #1827064 is a reply to message #1827037] |
Wed, 06 May 2020 10:22  |
Eclipse User |
|
|
|
Thanks for all your support, after a few hours of strugle I managed to make it work. Here are the steps i followed for some future reference:
as christian has anticipated I didn't have any CI or complex maven setup I cared about
- create an xtext project with the same name and workspace as the old one (there will be some copy and paste and this will make it easier)
- select "eclipse plugin option" if you need it
- select Gradle as build system
- select normal as "language server"
- select "web" if needed and click finish
- move all the /src/* of all the old project (in my case the root one, 'ide', 'target', 'tests', 'ui', 'web') in the respective src folders of the new project
- do "run as mwe2 workflow" on the file "rootporject"/"YourGrammar".mwe2
- (OPTIONAL) add ` applicationName = 'xtext-server' ` the row beneath "mainClassName" inside "rootproject".ide/build.gradle
- open terminal inside the project and run "gradle installDist"
- "rootproject".ide/build/install/xtext-server/bin/xtext-server is your language server, you can call it from an ide plugin frontend (further reference on how to do this for VSCODE https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol)
Thanks for all your help
|
|
|
Powered by
FUDForum. Page generated in 0.06115 seconds