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 166139 - Poor variable generation for enums
Summary: Poor variable generation for enums
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks: 199793
  Show dependency tree
 
Reported: 2009-05-27 21:25 UTC by _ tboudreau
Modified: 2011-07-01 14:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2009-05-27 21:25:18 UTC
Say you have an enum PaddleMotion (UP, DOWN, STILL).  Write a keyListener like this (note the "setRightPaddleMotion"
method does not yet exist).

        public void keyPressed(KeyEvent e) {
            switch (e.getKeyCode()) {
                case KeyEvent.VK_A :
                    setRightPaddleMotion (PaddleMotion.UP);
                    break;

Accept the hint to create the "setRightPaddleMotion" method.  You get

    private void setRightPaddleMotion(PaddleMotion UP) {

"paddleMotion" would make a more sensible name than "UP"
Comment 1 Max Sauer 2009-06-08 15:30:07 UTC
Fixed.
---
http://hg.netbeans.org/jet-main/rev/27765666ca4f
Comment 2 Quality Engineering 2009-06-11 08:45:45 UTC
Integrated into 'main-golden', will be available in build *200906110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/27765666ca4f
User: Max Sauer <msauer@netbeans.org>
Log: #166139: Poor variable generation for enums
Comment 3 Marian Mirilovic 2009-07-07 09:51:59 UTC
verified in NB Dev (20090707)
Comment 4 pgebauer 2009-07-08 20:13:49 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/a29c9a0fd393
Comment 5 pribyl 2009-07-16 10:59:21 UTC
Product Version: NetBeans IDE 6.7.1 RC (Build 200907150227)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Verified in 6.7.1 RC