-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for using multiple language servers to be registered for the same files #4609 #5442
Conversation
Can one of the admins verify this patch? |
@@ -70,6 +71,7 @@ protected void addAnnotation(final Annotation annotation, final Position positio | |||
try { | |||
addPosition(position); | |||
} catch (BadLocationException ignore) { | |||
Log.error(getClass(), "BadLocation for "+annotation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken this line is not properly formatted
@@ -12,7 +12,7 @@ | |||
|
|||
import com.google.gwt.user.client.rpc.AsyncCallback; | |||
import com.google.gwt.user.client.ui.Widget; | |||
|
|||
import org.eclipse.che.api.languageserver.shared.dto.DtoClientImpls.CodeActionParamsDto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you use here implementations instead of interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lsp4j does not use interfaces
@@ -22,18 +22,18 @@ | |||
* @param diagnostic | |||
* Diagnostic - The discovered diagnostic. | |||
*/ | |||
void acceptDiagnostic(Diagnostic diagnostic); | |||
void acceptDiagnostic(String diagnosticsCollection, Diagnostic diagnostic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add description what diagnosticsCollection
parameter mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, not clear
Nice @tsmaeder ! This is really good, we need to write a nice release note paragraph for that enhancement! I'll provide the release note summary. Thanks |
2fd6fe0
to
c283fbe
Compare
Hi @tsmaeder. Could you record a small animated gif that we will include in the release note to demo the new capability? (Don't forget to zoom-in on your browser so that it will be visible to the reader); Thanks in advance |
c283fbe
to
18067e6
Compare
@benoitf this change should not be visible to the user until we start USING multiple language servers/file. Does it make sense to put it in the release notes? |
@tsmaeder : This issue + #5156 are adding new capability to the system - and they are pretty excellent ! I'll handle the release note section but its goal will not be on the end-user benefits, it will focus on explaining the new capability added to the system and what it will allow to do in the future - this could be interesting for any Che contributors. When we will leverage the capability, like The animated gif might not be necessary, but as you did a demo during the sprint demo, I thought it could nicely illustrate the explanations. |
dd9de00
to
0193958
Compare
Longer demo video available here: https://youtu.be/-G3WlGskIvs |
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Thanks a lot @tsmaeder ! |
0193958
to
f8f459f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: Thomas Mäder <tmader@redhat.com>
ci-build |
…the same files eclipse-che#4609 (eclipse-che#5442) Add support for using multiple language servers for the same files. Signed-off-by: Thomas Mäder <tmader@redhat.com>
What does this PR do?
This PR allows starting multiple language servers per file. The results for various calls are merged according to https://code.visualstudio.com/docs/extensionAPI/vscode-api.
Opening an editor blocks until all necessary editors have started. The merged server capabilities for all the applicable servers are computed whenever an editor is opened. One copy of a language server is started per project.
This PR is based on #5156, which is not merged yet.
What issues does this PR fix or reference?
#4609
Changelog
Added support for using multiple language servers to be registered for the same files.
Release Notes
The support of the Language Server Protocol is getting better and better in Eclipse Che. Two main aspects have been improved: the ability to register a language server for a specific filename and the ability to support multiple language servers for a single file.
Until now, it was only possible to register a language server for a file extension like
*.xml
, but now it is possible to register a language server for a specific filename likepom.xml
. The improvements also allow for multiple extensions/or and filenames to be mapped to a single mime type and language id. The language registration and language server launcher registration have also been separated. You can learn more into the following documentation.This version also allows multiple language servers to be used for a single file. When opening a file in an editor, the language servers registered for that file are initialized and started if needed. The results coming from the various language servers are computed together.
You can see a sample demo here in a python file, where Python language server and another demo language server are both registered and working together.
Those fundamental improvements on how language servers are supported in Che are going to provide more flexibility for contributors and more capabilities for users. As an example, it is now possible to provide support for a
pom.xml
file, where a Maven language server and an XML language server are both registered and operating together.Docs PR
eclipse-che/che-docs#256