eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Code snippets: In Javadoc view code snippets referring to classes or files ignore @link modifications

Open
#302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

The Javadoc view shows the preview of the code snippets that refer to a class or file, but without linking via @link. The `@link` comments are correctly removed, but not applied. In contrast, including the content directly inside the snippet tag ({@snippet : ... }) works as expected.

Java 18 code to reproduce the issue:
Sample.java:
```java
/**
* {@snippet class="Other" region="r1"}
*/
public class Sample { }
```
`Other.java` (contained in the source folder to which `--snippet-path` refers when generating Javadoc):
```java
// @start region="r1"
public class Other {
int field = 42; // @link substring="field" target="System#out"
}
// @end region="r1"
```

**Result:**
In the Javadoc view and in the hover, 42 should be linked to System.out

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.