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 242260 - Use package imports option generating FQN instead.
Summary: Use package imports option generating FQN instead.
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-24 07:48 UTC by manikantannaren
Modified: 2016-07-07 07:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
No package import statement generated. (128.42 KB, image/png)
2014-02-24 07:48 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2014-02-24 07:48:24 UTC
Created attachment 145523 [details]
No package import statement generated.

Test spec: http://services.netbeans.org/synergy/client/app/#/specification/297
test case: Use Package Imports

Steps
Options|Editor|Formatting
language: java
Category: Imports

Check the radio button Use package Imports

Expected Result
use class imports disabled in options dialog
Code completion or organize imports hints should generate package imports

Actual Result
use class imports disabled in options dialog
Code completion generates FQN at caret position instead of Import statement (see attachment)
Comment 1 Jiri Prox 2014-02-24 09:05:42 UTC
Unfortunately I cannot reproduce this issue.
Can you please provide exact steps to reproduce?

Thanks
Comment 2 manikantannaren 2014-03-10 16:15:19 UTC
I dont see the behaviour I reported anymore. I guess we can close the issue.
Comment 3 Jiri Prox 2014-03-11 08:25:27 UTC
Ok, closing as WFM, feel free to reopen when it occurs again
Comment 4 -Silver- 2015-08-17 15:31:58 UTC
I have the same issue.

Product Version: NetBeans IDE Dev (Build 201508160002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1252; en_IE (nb)

Steps to reproduce:
1. From Options -> Editor -> Formatting -> Java -> Imports select the radiobutton "Use Package Imports".
2. Open the file imports.Imports
3. Go into class Imports and type "Fil"

package imports;
public class Imports {
    Fil 
}

4. Press CTRL + Spacebar to open the code completion popup.
5. Select the first entry: "File (java.io)" and press Enter

This is the result:

package imports;

public class Imports {
    java.io.File
}
Comment 5 Jiri Prox 2015-08-24 13:57:09 UTC
Does it happen always or is it random?
Did you confirm the change in the options dialog?
Comment 6 stwr 2015-09-01 11:27:27 UTC
I cannot reproduce it.

Product Version: NetBeans IDE Dev (Build 201508310002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 7 Martin Balin 2016-07-07 07:28:02 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