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 153328 - [68cat] Add an "implement all abstract methods" hint for enum classes with abstract methods
Summary: [68cat] Add an "implement all abstract methods" hint for enum classes with ab...
Status: VERIFIED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-17 16:21 UTC by matthies
Modified: 2013-06-06 06:31 UTC (History)
2 users (show)

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 matthies 2008-11-17 16:21:34 UTC
Example:

    enum FooBar
    {
        FOO, BAR;        
        public abstract String description();
    }

A hint "implement all abstracts methods" should be shown on the enum constants. Executing the hint would result in 
something like:

    enum FooBar
    {
        FOO
        {
            public final String description()
            {
                throw new UnsupportedOperationException("Not supported yet.");
            }
        },
        
        BAR
        {
            public final String description()
            {
                throw new UnsupportedOperationException("Not supported yet.");
            }
        };
        
        public abstract String description();
    }

Because such a method needs to be implemented by all enum constants, it makes sense to have only one hint for all the 
constants instead of one per constant. Of course an implementation of the respective method should only be generated 
for those constants that do not already have an implementation of that method.
Comment 1 matthies 2008-11-17 16:22:18 UTC
See also issue 153327.
Comment 2 matthies 2009-10-27 20:04:57 UTC
Still missing.
Comment 3 Jan Lahoda 2013-01-08 08:32:35 UTC

*** This bug has been marked as a duplicate of bug 121453 ***
Comment 4 magnetox 2013-06-06 06:31:17 UTC
As of June of 2013, the hint appears but it does not do anything.
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.5.0-28-generic running on i386; UTF-8; en_US (nb)
OS: Linux Mint Nadia (14) KDE 4.10.2