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

@link highlighting broken when linking to class #1753

Closed
SamJakob opened this issue Jan 1, 2021 · 5 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1641
Closed

@link highlighting broken when linking to class #1753

SamJakob opened this issue Jan 1, 2021 · 5 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1641

Comments

@SamJakob
Copy link

SamJakob commented Jan 1, 2021

When using the @link doc tag to refer to a class, rather than a method (which is valid), it is not highlighted, however it is for a method.

Environment
  • Operating System: Windows 10
  • JDK version: JavaSE-1.8
  • Visual Studio Code version: 1.52.1
  • Java extension version: 0.73.0
Steps To Reproduce
  1. Open a Java file
  2. Paste in the following Javadoc comment
/**
 * {@link String}
 * {@link String#toCharArray()}
 */

image
Notice how only the latter has correct syntax highlighting.

Current Result

Syntax highlighting is only applied to the @link tag when referring to a method.

Expected Result

Syntax highlighting should be applied to the @link tag when referring to a method or a class.

@fbricon
Copy link
Collaborator

fbricon commented Jan 1, 2021

The textmate grammar is defined in vscode itself, but the source of the grammar is actually atom, so the problem should be reported there: https://github.com/atom/language-java/issues

@SamJakob
Copy link
Author

SamJakob commented Jan 1, 2021

Filed upstream.

@0dinD
Copy link
Contributor

0dinD commented Jan 1, 2021

FYI @fbricon @SamJakob this issue can also be fixed via semantic highlighting. I had this in mind for my next iteration of semantic highlighting improvements, and I've actually already implemented a fix for this specific issue, which has been sitting on my local development branch for a while.

Sadly I got busy and never got to the point of submitting a PR. But I think I'll have time to do that next week. So if all goes well I'm guessing this can make it into the next release of the extension.

Also, isn't the TextMate grammar defined by the extension itself now, since #1638? I mean, the issue still has to be fixed upstream, but we don't really depend upon VS Code anymore.

@0dinD
Copy link
Contributor

0dinD commented Jan 26, 2021

eclipse-jdtls/eclipse.jdt.ls#1641 was merged, so this should be fixed now (at least via semantic highlighting) and is ready for release in the next update.

@testforstephen testforstephen added this to the Early February 2021 milestone Jan 27, 2021
@testforstephen
Copy link
Collaborator

@0dinD thanks for the fix, i will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants