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 - Not found method usages code using method reference syntax
Summary: Not found method usages code using method reference syntax
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords: PLAN
Depends on: 235524
Blocks:
  Show dependency tree
 
Reported: 2013-08-27 14:36 UTC by Jachym_Vojtek
Modified: 2013-09-04 18:26 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.