Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to add LSP support in existing Xtext project
How to add LSP support in existing Xtext project [message #1804983] Thu, 04 April 2019 08:54 Go to next message
Marcus Mews is currently offline Marcus MewsFriend
Messages: 1
Registered: April 2017
Junior Member
In the N4JS project, we want to explore the LSP feature of Xtext. For this reason, the mwe2 workflow was adjusted and we have the two files N4JSIdeModule and N4JSIdeSetup are present (containing no other code than the defaults). Also, I added a RunServer.java that contains a small main method to start an LSP server.

I populated the N4JSIdeModule with bindings from our existing N4JSUiModule. After starting the server, the console gives me some injection errors, which I understand to some extend. But before going through all injection bindings and errors, I'd like to get better understanding of the background of LSP support / ide packages in Xtext.

So, my questions (which overlap each other) would be:
- What is the general idea on ui and ide packages/dependencies?
- Is there some guide or help that I can read regarding separation of ui and ide, or what I need to consider when adding the LSP support?
- Can/should the (N4JS)IdeModule (transitivily) depend on ui packages of xtext or eclipse?

The stacktrace below indicates the problems of resolving/injecting the correct dependencies.
1) No implementation for org.eclipse.ui.plugin.AbstractUIPlugin was bound.
  while locating org.eclipse.ui.plugin.AbstractUIPlugin
    for parameter 0 at org.eclipse.xtext.ui.PluginImageHelper.hookBundleListener(Unknown Source)
  at org.eclipse.xtext.ui.PluginImageHelper.hookBundleListener(Unknown Source)
  while locating org.eclipse.xtext.ui.PluginImageHelper
    for field at org.eclipse.n4js.ui.outline.AbstractN4JSFilterOutlineContribution.imageHelper(Unknown Source)
  at org.eclipse.n4js.ui.N4JSIdeModule.configureInheritedMembersOutlineContribution(N4JSIdeModule.java:741)
Re: How to add LSP support in existing Xtext project [message #1805006 is a reply to message #1804983] Thu, 04 April 2019 14:04 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13155
Registered: July 2009
Senior Member
you should not use AbstractN4JSFilterOutlineContribution or any other eclipse ui stuff in N4JSIdeModule

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Proper Integration with Sirius
Next Topic:Can't understand why one rule are recognized as another
Goto Forum:
  


Current Time: Tue Oct 15 22:11:20 GMT 2019

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

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

Back to the top