Targeting both eclipse and LSP [message #1763861] |
Mon, 22 May 2017 06:25  |
Eclipse User |
|
|
|
Hi!
I have an Xtext language that I need to use both as Eclipse plugin and as a LSP server. I managed to build the two versions, but the problem is that I have code in the generator class that uses Eclipse resource APIs /IFile, IMarker) and those aren't available to the LSP server.
The right fix would be to let the generator use only Files and return markers as LSP diagnostics, while using LSP4e on the Eclipse side, but I am targeting Neon and there's a lot of plumbing to adjust in order to make that work.
So I wonder if anyone has suggestions about a simpler solution. Thanks in advance!
best regards,
Vlad
|
|
|
|
Re: Targeting both eclipse and LSP [message #1763881 is a reply to message #1763867] |
Mon, 22 May 2017 10:00  |
Eclipse User |
|
|
|
Thank you for the pointers, Karsten.
My excuse is that most of the code is from a while ago when I was greener, and it's not always easy to rethink it. 3rd party comments help a lot!
Anyway:
* the main reason to involve eclipse resources is that some URIs are platform:// and using ResourcesPlugin to resolve that is the simplest way (but now, it isn't anymore).
* my generator is an external process that even compiles the DSL, so this was an optimization that I have to review now.
thanks again,
Vlad
|
|
|
Powered by
FUDForum. Page generated in 0.02658 seconds