[BUG] Eclipse doesn't find usages of extension-methods in "find references" nor rename-refactoring (original) (raw)
Describe the bug
When using methods made accessible via @ExtensionMethod these usages of the methods are neither found by "References in Workspace" (Ctrl-G), nor are they changed when refactoring such methods' names.
To Reproduce
- Make some methods available via
@ExtensionMethod:
@ExtensionMethod(MyExtensions.class) // containing a static method foo(Object o)
class AnyClass {
void anyMethod() {
Object o = new Object();
o.foo();
}
} - Variations of the problem
- "References in Workspace"
* move cursor onfoo
* press Ctrl-G
* Result: search for usages of foo() doesn't contain classAnyClass - "Refactor"/"Rename"
* move cursor onfoo
* press Alt-Ctrl-R
* typebaras a new name and press return
* Result: method name gets changed in ClassMyExtensions, but usage inAnyClassdoes not. Results in syntax error in classAnyClass. - Invocation from class
MyExtensions
* go to classMyExtensions
* move cursor onfoo
* invoke one of the above operation
* both operation don't find/change anything in classAnyClass
- "References in Workspace"
Expected behavior
- usages of
foo()in classAnyClassshould be found - renaming of
foo()'s name should affect usage in classAnyClass
Version info (please complete the following information):
- Lombok version: 1.18.26
- Eclipse: 2023-03