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 236939

Summary: [Organize Imports] missing for Use Fully Qualified Names
Product: java Reporter: ssazonov
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal CC: MackSix
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description ssazonov 2013-10-09 12:18:05 UTC
1. Go to Tools > Options > Editor > Hints > select Language Java and check all Imports (except Star import)

2. Switch to tab Foramtting and select Use Fully Qualified Names then press Ok

3. create new simple java class without any imports:

public class ClassA {

	File f;
}

4. there is hint in front of "File f;" saying "Add import for java.io.File" click it and new "import java.io.*;" is added

>> instead of adding import it should change "File f;" to "java.io.File f;" because "Fully Qualified Names" is selected in Options

>> There should be "Oranize imports" hint in front of "import java.io.*;" for replacing with Fully Qualified Names

Product Version: NetBeans IDE 7.4 (Build 201310012201)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 MackSix 2015-09-23 23:02:06 UTC
This setting only affects "Fix Imports". It suppress the imports from being added and causes broken names to be prepended with their fully qualified name.
Comment 2 Svata Dedic 2015-09-25 13:26:39 UTC
The case with adding using FQN instead of adding an import was fixed as issue #255301
Comment 3 Martin Balin 2016-07-07 07:17:24 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss