简体   繁体   中英

How to search by method's fully qualified name in Eclipse

I need to search by method's qualified name in Eclipse (Luna)

I've tried to find myMethod using qualified name (copied with right click > Copy Qualified Name ) and then Ctrl+V in Eclipse's search box myproject.core.services.MyClass.myMethod(P)

this way:

eclipseSearchBox

The code is like this:

public class MyClass extends AnotherClass {
    @Override
    public void myMethod(P p) {
        // code
    }
}

When I search as shown in the above image, I'm getting as search result the method from the parent class (AnotherClass)

I want MyClass's overridden method as search result.

Instead of limiting the query to qualified references , choose in the Limit To section Declaration to find the method declaration.

The match location Qualified references is for static methods. For example, in the following main method, there are one non-qualified and two qualified references to the com.example.Foo.foo() method:

package com.example;
public class Foo {

    public static void main(String[] args) {
        foo(); // non-qualified reference
        Foo.foo(); // qualified reference
        com.example.Foo.foo(); // (full) qualified reference
    }

    static void foo() {}

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM