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 130477

Summary: "Assign Return Value To New Variable" cannot be actuated on lines with an "';' expected" error annotation
Product: java Reporter: matthies <matthies>
Component: HintsAssignee: Daniel Prusa <dprusa>
Status: CLOSED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description matthies 2008-03-19 06:58:00 UTC
Example:

    class Test
    {
        public void f()
        {
            getClass()
        }
    }

Place the cursor on the 'getClass' identifier and press Alt+Enter.
This displays the following two hints in the tooltip-like popup:

    ';' expected

    Assign Return Value To New Variable

But there is only a single error annotation icon in the gutter area (with the same toolitp contents), and there appears 
no way to execute "Assign Return Value To New Variable".

If "Assign Return Value To New Variable" cannot be executed, it shouldn't be displayed.
Of course it would be better to be able to execute it despite the missing ';', and to have the light bulb icon be 
displayed for it.


Product Version: NetBeans IDE 6.1 Beta (Build 200803050202)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Jan Lahoda 2008-03-19 08:05:15 UTC
Should be OK after issue #92091 was fixed.

*** This issue has been marked as a duplicate of 92091 ***
Comment 2 matthies 2008-05-02 09:33:52 UTC
Verified as fixed in 6.1 final.