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 254622 - [81cat]Source|Organize imports does not honour import settings in Editor Formatting options
Summary: [81cat]Source|Organize imports does not honour import settings in Editor Form...
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 02:08 UTC by manikantannaren
Modified: 2015-09-18 12:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (90.44 KB, text/plain)
2015-08-23 02:08 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2015-08-23 02:08:37 UTC
Product Version = NetBeans IDE Dev (Build 201508200002)
Operating System = Mac OS X version 10.10.4 running on x86_64
Java; VM; Vendor = 1.8.0_60-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Test case:
http://services.netbeans.org/synergy/client/app/#/case/2349/suite/1301/v/1

Steps to reproduce
1. In Options|Editor|Formatting
2.Language: Java
3. Category: Imports
4. Ensure that Single class imports are chosen.
5. Open any java class
6.Provide imports similar to ones below
import java.util.*;
import java.io.File;
import static java.lang.System.out;
import static java.math.BigInteger.ONE;
import java.io.IOException;
7. From menu bar choose Source|Organize imports

Expected result
Star imports are changed to Class imports by default.

Actual REsults
Star imports are retained.
Comment 1 manikantannaren 2015-08-23 02:08:46 UTC
Created attachment 155555 [details]
IDE log
Comment 2 manikantannaren 2015-08-23 02:14:21 UTC
OPen Options|Editor|Formatting
Language: Java
Category:Imports

Select Package Imports
In source file, call Source|Organize imports

Expected and actual result are the same: imports are made by package

Reset the imports formatting to Use Single Class imports
Package imports organized earlier are not changed to class imports.
Comment 3 Jiri Kovalsky 2015-08-25 11:07:26 UTC
Reassigning for further evaluation.
Comment 4 Dusan Balek 2015-09-18 12:15:28 UTC
To change star imports to class imports make sure that the 'Class Count to Use Star Import' checkbox is checked and the value is set to some 'high enough' number.