-
Notifications
You must be signed in to change notification settings - Fork 401
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
Find references to fields via getters/setters #1548
Comments
I don't think Eclipse JDT supports that. @snjeza can you check please? |
Sorry I may have not made it clear but this is a feature request :) |
Java LS supports Find References. Eclipse supports All Occurrences, References, Declarations, Read Accesses, Write Accesses |
@Frederick888 You can check |
@snjeza I'm a little lost. @Entity
@Data
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@EqualsAndHashCode(exclude = {"apples"})
public class Tree {
@Id
@GeneratedValue
private Long id;
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "tree")
private List<Apple> apples;
} I can use |
@Frederick888 can you provide a project example? |
I can can try to add getter/setter references when searching field references. |
yes, but we should make it optional. Add a pref to disable it please. |
@fbricon ok. |
@snjeza Thank you! And by the way -- I know I'm probably asking for too much here -- will it also be possible to jump from fields to Lombok constructors/builders? For instance, from https://github.com/Frederick888/java-dummy/blob/b38bab6e135e84dc5d181294d719e06e77b4a16e/src/main/java/com/example/demo/dao/Apple.java#L24 to https://github.com/Frederick888/java-dummy/blob/master/src/main/java/com/example/demo/service/impl/AppleTreeServiceImpl.java#L26 ? |
@Frederick888 I will try. |
I'm using coc-java with jdt.ls v0.60.0.
Currently
<Plug>(coc-references)
only returns direct usages for class fields. To list references via getters/setters, one has to dococ-references
on those methods again. This can be even more inconvenient when Lombok is used, in which case coc only says[coc.nvim] References not found
(I have configured VM options correctly I think, as I can see getter/setter completions).The text was updated successfully, but these errors were encountered: