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 222851 - Organize members hint and action are broken
Summary: Organize members hint and action are broken
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-27 16:54 UTC by _ gtzabari
Modified: 2012-11-30 02:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase (3.97 KB, application/octet-stream)
2012-11-27 16:54 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2012-11-27 16:54:33 UTC
Created attachment 128473 [details]
testcase

Product Version: NetBeans IDE Dev (Build 201211270002)
Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

I no longer get the "organize members" hint, and sometimes invoking "organize members" manually from the pull-down menu just triggers a beep and does nothing.

In the attached project, SomeClass is out of place yet the hint is missing.
Comment 1 _ gtzabari 2012-11-27 16:58:46 UTC
Increasing to P2 because this is a regression (worked in nightly build from last week). This might be related to issue #219952 (though I don't see how that commit could have broken the hint).
Comment 2 Jan Lahoda 2012-11-27 18:26:07 UTC
Sorry, but I do see the warning on a build from jet-main I just did. I have found out that the action does not work when the caret is outside a top-level class, but from the code it seems it never worked differently. What do I need to do to see the problem?

Thanks.
Comment 3 _ gtzabari 2012-11-27 19:19:54 UTC
1. I can't comment on a private build. Can you please try the specific build number I mentioned? It's currently available off netbeans.org. Once you can reproduce the problem there, and your private build is newer, we can assume the hint bug is fixed. If you can't reproduce it in the first place then we've got another problem.

2. I can confirm that "organize members" doesn't work outside the top-level class. This isn't intuitive so I'd like you to consider changing the behavior. I can open a separate enhancement request if you wish.
Comment 4 Jan Lahoda 2012-11-28 08:31:46 UTC
Sorry, still no luck with 201211270002.
Comment 5 Dusan Balek 2012-11-28 09:40:08 UTC
ad 1) Unfortunately, I cannot reproduce the problem too. Opening class App from the attached project - 'organize imports' hint appears as expected (if enabled via Tools -> Options -> Editor -> Hints).

ad 2) Fixed in jet-main. Organize members action should work if invoked outside of top level class now. 

http://hg.netbeans.org/jet-main/rev/f284bf74105d
Comment 6 _ gtzabari 2012-11-28 17:28:22 UTC
Confirmed. For issue #1, the hint was disabled in the global options. Sorry for the false-alarm. Thanks for fixing issue #2!
Comment 7 Quality Engineering 2012-11-30 02:45:06 UTC
Integrated into 'main-golden', will be available in build *201211300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f284bf74105d
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #222851 - Organize members action should work if invoked outside of topl level class.