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

Add Markdown support (JEP 467) for Java 23. #3282

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Sep 24, 2024

  • Delegate to markdown content access when javadoc node starts with '///'
  • Add basic testcase

A continuation of #3278 .

Note : Links currently don't work. I did try to define a private static class JdtLsMarkdownAccessImpl extends CoreMarkdownAccessImpl that copies over the link creation from

protected String createLinkURI(String scheme, IJavaElement element, String refTypeName, String refMemberName, String[] refParameterTypes) throws URISyntaxException {
URI javadocURI = CoreJavaElementLinks.createURIAsUri(scheme, fElement, refTypeName, refMemberName, refParameterTypes);
IJavaElement linkTarget = CoreJavaElementLinks.parseURI(javadocURI);
if (linkTarget == null) {
return "";
}
try {
Location locationToElement = JDTUtils.toLocation(linkTarget);
if (locationToElement != null) {
return locationToElement.getUri() + "#" + (locationToElement.getRange().getStart().getLine() + 1);
}
} catch (JavaModelException e) {
}
return "";
}
. It doesn't seem to work because markdown links seem to be converted to the form <code><a href="[url]">[label]</a></code> and Remark doesn't seem to like preserving links within <code> blocks.

jep-467-1

- Delegate to markdown content access when javadoc node starts with
  '///'
- Add basic testcase

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber added this to the End September 2024 milestone Sep 24, 2024
@rgrunber rgrunber self-assigned this Sep 24, 2024
@rgrunber rgrunber merged commit 0e81cc4 into eclipse-jdtls:master Sep 25, 2024
6 of 7 checks passed
@rgrunber rgrunber deleted the java23-markdown branch September 25, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants