Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 166139 - Poor variable generation for enums
Poor variable generation for enums
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Hints
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Max Sauer
issues@java
67patch1-verified
:
Depends on:
Blocks: 199793
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo