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 88461

Summary: Quick fix "implement interface"
Product: java Reporter: Tim Lebedkov <lebedkov>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: markiewb
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tim Lebedkov 2006-11-01 20:57:20 UTC
for example if someone writes:

TableModel m = ...
m.addChangeListener(this);

and this does not implement ChangeListener this will be changed to implement it.

Thank You
Comment 1 markiewb 2012-12-28 22:44:51 UTC
*** Bug 223366 has been marked as a duplicate of this bug. ***
Comment 2 markiewb 2013-11-01 21:15:30 UTC
Here is another (artificial) example

Input code:
------------
package sample;

public class NewMain1 {

    public void main(String[] args) {
        new javax.swing.JButton().addActionListener(this);
    }
}

Transformed code:
-----------------
package sample;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class NewMain1 implements ActionListener{

    public void main(String[] args) {
        new javax.swing.JButton().addActionListener(this);
    }

    public void actionPerformed(ActionEvent e) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
Comment 3 Svata Dedic 2015-10-02 13:11:02 UTC

*** This bug has been marked as a duplicate of bug 234263 ***