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

Adopt improved DocumentSymbolProvider API #780

Closed
fbricon opened this issue Sep 5, 2018 · 6 comments
Closed

Adopt improved DocumentSymbolProvider API #780

fbricon opened this issue Sep 5, 2018 · 6 comments

Comments

@fbricon
Copy link
Contributor

fbricon commented Sep 5, 2018

A DocumentSymbolProvider should now return document symbols which can represent a hierarchy and that can differentiate between the full range of a symbol and the selection range, e.g. the name of a function.

The API is already available in LSP4J (0.5.0).

@kittaakos
Copy link

This LSP4J issue might affect this task: eclipse-lsp4j/lsp4j#252. I am waiting for confirmation.

@kittaakos
Copy link

@fbricon, I start working on this issue. Please assign this to me. Thank you!

@kittaakos
Copy link

This requires bumping up LSP4J to the 0.5.0.v20180903-1212 release. 0.5.0has API changes:

  • o.e.lsp4j.services.TextDocumentService#codeAction(o.e.lsp4j.CodeActionParams)
  • o.e.lsp4j.services.TextDocumentService#documentSymbol(o.e.lsp4j.DocumentSymbolParams)

I will work on the documentSymbol in the scope of this task, but the codeAction, I just adjust to compile. This means, CodeAction will not be supported.

@fbricon
Copy link
Contributor Author

fbricon commented Sep 12, 2018

@kittaakos lsp4j 0.5.0.M1 is now in use. You can start playing :-)

kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 13, 2018
…ument symbols.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos
Copy link

kittaakos commented Sep 14, 2018

I found an inconsistency between the JDT UI code and the code we have copied into JDT LS.
According to the JDT UI code, the JavaElementLabels.DECL_STRING should be " :" (see the leading whitespace).

https://github.com/eclipse/eclipse.jdt.ui/blob/6dfe33cd6d1478e9ebb5819c42945dcb78acae61/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java#L366

https://github.com/eclipse/eclipse.jdt.ui/blob/6dfe33cd6d1478e9ebb5819c42945dcb78acae61/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/JavaElementLabelsCore.java#L344

https://github.com/eclipse/eclipse.jdt.ui/blob/6dfe33cd6d1478e9ebb5819c42945dcb78acae61/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/JavaElementLabelsMessages.properties#L21

It is ":" (without the leasing whitespace) in JDT LS.

I am going to change it and fix if there are no objections.

Also, I am going to add the type information of the return type to the method names.

Before:
screen shot 2018-09-14 at 10 40 47

After:
screen shot 2018-09-14 at 10 40 25

kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 14, 2018
…ument symbols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 17, 2018
…ols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 17, 2018
…ols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 17, 2018
…ols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 17, 2018
…ols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit to kittaakos/eclipse.jdt.ls that referenced this issue Sep 17, 2018
…ols.

Closes: eclipse-jdtls#780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos
Copy link

PR: #792

fbricon pushed a commit that referenced this issue Sep 17, 2018
Closes: #780.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@fbricon fbricon added this to the Mid September 2018 milestone Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants