This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235104

Summary: Not found method usages code using method reference syntax
Product: java Reporter: Jachym_Vojtek
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal Keywords: PLAN
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 235524    
Bug Blocks:    

Description Jachym_Vojtek 2013-08-27 14:36:20 UTC
package lambdatests;

import java.awt.event.ActionEvent;


import javax.swing.JButton;

public class MySecondLambda {
    void foo() {
        JButton btn = new JButton();
        btn.addActionListener((ActionEvent e) -> System.out.println(e));
        btn.addActionListener(this::actionPerformed);
    }

    public void actionPerformed(ActionEvent e) {        
    }
}


If you try to find usages of method MySecondLambda.actionPerformed(ActionEvent) nothing is found.
But in fact the usage is in code of: this::actionPerformed.
Comment 1 Jachym_Vojtek 2013-08-27 14:38:55 UTC
I should have mentioned that Java 1.8 in project is used.
Comment 2 Ralph Ruijs 2013-09-04 18:26:13 UTC
Refactoring part fixed by: http://hg.netbeans.org/jet-main/rev/5d4a3004a2b0

When #235524 is fixed, scopes other then Current File should work as well.