Skip to main content



      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 04:54 Go to next message
Eclipse UserFriend
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 10:04 Go to previous message
Eclipse UserFriend
you should not use AbstractN4JSFilterOutlineContribution or any other eclipse ui stuff in N4JSIdeModule
Previous Topic:Proper Integration with Sirius
Next Topic:Can't understand why one rule are recognized as another
Goto Forum:
  


Current Time: Fri Jun 20 01:37:06 EDT 2025

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

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

Back to the top