Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » InMemory Language Server Protocol?
InMemory Language Server Protocol? [message #1767128] Sat, 01 July 2017 15:41 Go to next message
K Kumar is currently offline K KumarFriend
Messages: 29
Registered: March 2011
Junior Member
All the examples I have seen so far shows running the dsl language server as separate java process and communicating via json rpc. It makes sense if client is non-java.

If we are using xtext language server in Eclipse Oxygen Generic Text editor, is there a way to configure to run xtext language server inmemory without running separate process?
Re: InMemory Language Server Protocol? [message #1767137 is a reply to message #1767128] Sat, 01 July 2017 20:17 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 550
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Sure, the protocol will be still JSON-RPC, but within the same process. The server just accepts In/Out streams, that could be of course in-process. I'm not deep into LSP4E, but if I get it right the default implementation assumes that the language server is started in a separate process (see ProcessStreamConnectionProvider). You would have to implement your own StreamConnectionProvider and start the DSLs server in the same process.
Re: InMemory Language Server Protocol? [message #1767141 is a reply to message #1767137] Sat, 01 July 2017 23:23 Go to previous message
David BlackFriend
Messages: 33
Registered: June 2017
Member
I've been tinkering around lately by "refactoring" the LSP4j LSP implementation to support other languages (a DSL of mine) and other messaging mechanisms, becausei if I remember well, right now only Java Sockets, Standard Streams and some native-bound sockets library are supported.

I might have missed many things, but I can't remember seeing the routines to start a different process.

Anyway I second what's been hinted by Karsten - begin around stream providers and implement your way through. Nothin impedes you from implementing everything within the same JVM process. You might need to refactor a good amount of code though to hook in your implementations (at least I needed to).

Good luck!
Previous Topic:Unicode beyond U+FFFF accepted in DSL - how to?
Next Topic:Bug with Valueconverter of a String into a double?
Goto Forum:
  


Current Time: Tue Nov 21 12:16:21 GMT 2017

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

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