Skip to content
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

Update lsp4J lib to newer version. #5292

Merged
merged 11 commits into from
Jul 14, 2017
Merged

Update lsp4J lib to newer version. #5292

merged 11 commits into from
Jul 14, 2017

Conversation

AndrienkoAleksandr
Copy link
Contributor

What does this PR do?

Update lsp4j to 0.2.0 version

Fix bugs in language server dto generator. This bugs is not critical for current lsp4j 0.1.2 library. But dto generation fails if we update this library to 0.2.0. Fix some typos.

Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
@AndrienkoAleksandr
Copy link
Contributor Author

Depends on #5290

@codenvy-ci
Copy link

Build # 2752 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2752/ to view the results.

@AndrienkoAleksandr
Copy link
Contributor Author

@codenvy-ci
Copy link

Build # 2762 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2762/ to view the results.

@tsmaeder
Copy link
Contributor

PHP hover support is currently broken until lsp4j is updated (hover contains MarkedString instances, which are not supported on 0.1.2

…e into updateLSP4Jlib

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>

# Conflicts:
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/service/TextDocumentService.java
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
@benoitf
Copy link
Contributor

benoitf commented Jun 29, 2017

Wip on the title should be removed no ?

@evidolob evidolob changed the title [WIP] Update lsp4J lib to newer version. Update lsp4J lib to newer version. Jun 29, 2017
@codenvy-ci
Copy link

Build # 2950 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2950/ to view the results.

Yevhen Vydolob added 2 commits July 12, 2017 17:45
…e into updateLSP4Jlib

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>

# Conflicts:
#	plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageServerExtension.java
#	plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/CompletionItemBasedCompletionProposal.java
#	plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/LanguageServerCodeAssistProcessor.java
#	wsagent/che-core-api-languageserver/pom.xml
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/launcher/LanguageServerLauncher.java
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/registry/ServerInitializerImpl.java
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/service/TextDocumentService.java
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
@codenvy-ci
Copy link

Build # 3056 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3056/ to view the results.

Yevhen Vydolob added 3 commits July 13, 2017 10:48
…e into updateLSP4Jlib

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>

# Conflicts:
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/registry/ServerInitializerImpl.java
#	wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/service/TextDocumentService.java
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
hover.setContent(content);

return hover;
Promise<OrionHoverOverlay> then = promise.then((Function<Hover, OrionHoverOverlay>)arg -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think writing `(Hover arg)->....' would make the generic types clear and it feels nicer than a cast.

// plain markdown text
contents.add(dto.getLeft());
} else {
contents.add(dto.getRight().getLanguage());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "language" field is supposed to help render the content, not be displayed. Should we simply ignore the tag if we don't properly handle it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We(Orion) properly handle it

@@ -113,11 +116,13 @@ public SignatureHelpOptions getSignatureHelpProvider() {
return result;
}

public TextDocumentSyncKind getTextDocumentSync() {
public Either<TextDocumentSyncKind, TextDocumentSyncOptions> getTextDocumentSync() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to merge the whole thing, or can we just return TextDocumentSyncKind here? I don't think we're doing anything on the client side with it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But for new version of the LS we should support all sync options

if (CLIENT_CAPABILITIES == null) {
CLIENT_CAPABILITIES = new ClientCapabilities();
WorkspaceClientCapabilities workspace = new WorkspaceClientCapabilities();
workspace.setApplyEdit(false); //Change when support added
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can omit anything that is false. I find it confusing to set stuff that is default anyway.

@@ -99,8 +101,8 @@ public void configureMethods() {
dtoToDtoList("references", ReferenceParams.class, LocationDto.class, this::references);
dtoToDtoList("onTypeFormatting", DocumentOnTypeFormattingParams.class, TextEditDto.class, this::onTypeFormatting);

dtoToDto("completionItem/resolve", ExtendedCompletionItem.class, ExtendedCompletionItemDto.class, this::completionItemResolve);
dtoToDto("documentHighlight", TextDocumentPositionParams.class, DocumentHighlightDto.class, this::documentHighlight);
dtoToDto("completionItem/resolve", ExtendedCompletionItem.class, ExtendedCompletionItem.class, this::completionItemResolve);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? Why is it different from the lines above (LocationDto, TextEditDto, etc.)?

@codenvy-ci
Copy link

Build # 3060 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3060/ to view the results.

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
@codenvy-ci
Copy link

Build # 3061 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3061/ to view the results.

@evidolob evidolob self-assigned this Jul 14, 2017
@evidolob evidolob merged commit 7b9c2a1 into master Jul 14, 2017
@evidolob evidolob deleted the updateLSP4Jlib branch July 14, 2017 08:05
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* eclipse-che#5360 Upgrade LSP4J library version to 0.2.0
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants