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 204940 - Static imports are not put to the configured place
Summary: Static imports are not put to the configured place
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 14:15 UTC by Tomas Mysik
Modified: 2015-03-18 13:48 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 Tomas Mysik 2011-11-10 14:15:36 UTC
Have these IDE options for Java imports:
- Separate Static Imports
- (static imports are the last ones)
- Separate Groups

Steps:
- have a unit test
- add "import static org.junit.Assert.*;" somewhere among imports
- invoke hint "Organize imports"
-> static imports are not in the end of the list of imports

Product Version: NetBeans IDE Dev (Build 20111110-c2a4208378f6)
Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Dusan Balek 2011-11-10 15:47:01 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/486ea0c43b45
Comment 2 Quality Engineering 2011-11-11 15:37:08 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/486ea0c43b45
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #204940: Static imports are not put to the configured place - fixed.
Comment 3 svanimpe 2014-01-04 22:54:23 UTC
I'm having the exact same problem with NetBeans IDE Dev (Build 201401030002).
Comment 4 Tomas Mysik 2014-01-06 07:16:30 UTC
@svanimpe: In such case, you should reopen this issue otherwise it will stay resolved as FIXED...

Thanks.
Comment 5 idclaar 2014-07-18 19:30:10 UTC
I'm also experiencing this behavior.  None of the settings for imports seem to work when I right-click -> Fix Imports.
Comment 6 Dusan Balek 2015-03-18 13:48:16 UTC
Please note that 'Fix Imports' does not modify order of the existing import statements. You have to use the 'Organize Imports' action that seems to work correctly in the current dev build.