这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] Eclipse doesn't find usages of extension-methods in "find references" nor rename-refactoring #3373

@dstango

Description

@dstango

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 on foo
      • press Ctrl-G
      • Result: search for usages of foo() doesn't contain class AnyClass
    • "Refactor"/"Rename"
      • move cursor on foo
      • press Alt-Ctrl-R
      • type bar as a new name and press return
      • Result: method name gets changed in Class MyExtensions, but usage in AnyClass does not. Results in syntax error in class AnyClass.
    • Invocation from class MyExtensions
      • go to class MyExtensions
      • move cursor on foo
      • invoke one of the above operation
      • both operation don't find/change anything in class AnyClass

Expected behavior

  • usages of foo() in class AnyClass should be found
  • renaming of foo()'s name should affect usage in class AnyClass

Version info (please complete the following information):

  • Lombok version: 1.18.26
  • Eclipse: 2023-03

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions