Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.81 KB

index.adoc

File metadata and controls

37 lines (23 loc) · 1.81 KB

Eclipse Language Services

Start point for documentation related to eclipse language services

The idea is to have a proof of concept of Language Services on Eclipse by:

  • implementing a subclass of SSE Structured Editor that sends data to a language service

As protocol we refer to the vscode languageserver protocol, implemented under MIT license by the team of E.Gamma, (MicroSoft) .

Server Side

The easiest way to have a language server running is to install VSCode: http://code.visualstudio.com/

  1. How to run the JavaScript language server

  2. Start VSCode

  3. Clone a git repo with JS code: https://github.com/josdejong/mathjs

  4. Open the cloned folder in VSCode

Eclipse IDE Side

We choose to start implementing a JavaScript Editor as VSCode already provides a Language Server Service for a JavaScript editor. You can extend this by adding any other editor, as example XML, Java, Xtext, PHP, HTML, XSLT, SASS, etc.

  • We created a plugin org.eclipse.lsp4e, which implements an extension to org.eclipse.wst.jsdt.ui.javaCompletionProposalComputer.

  • The LanguageCompletionProposalComputer#computeCompletionProposals(..) is the method that actually provides content assist.

  • To run, you need to setup for JSDT, explained here: https://www.youtube.com/watch?v=gOz1hk-ohMA

Important Notes and References