History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-17167
Type: Bug Bug
Status: Open Open
Assignee: Alexey Kudravtsev
Reporter: Stephen Friedrich
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

"Create method" quick fix fails to add outer class qualifier

Created: 15 Feb 08 15:28   Updated: 01 Apr 08 20:33
Component/s: Editor. Intention Actions

Build: 7,693


 Description  « Hide
In the following code use the quickfix "Create method" on the call to "windowClosed()" and have Idea generate the method in the outer class.
(I always directly delegate to a "real" method from within anonymous listeners).
public class Test {
    private JFrame frame;
    
    private void foo() {
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosed(WindowEvent e) {
                windowClosed();
            }
        });
    }
}

Result is:

public class Test {
    private JFrame frame;

    private void foo() {
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosed(WindowEvent e) {
                windowClosed();
            }
        });
    }

    private void windowClosed() {
    }
}

Instead Idea should have changed the call to "Test.this.windowClosed();"



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.