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 254442 - [81cat] Import inner class doesn't work as expected.
Summary: [81cat] Import inner class doesn't work as expected.
Status: RESOLVED INVALID
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-17 14:48 UTC by -Silver-
Modified: 2015-08-24 15:15 UTC (History)
0 users

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 -Silver- 2015-08-17 14:48:25 UTC
Following the test case:
http://services.netbeans.org/synergy/client/app/#/assignment/1397/v/1
Import Inner Classes 

Step to reproduce:
1. Go to Tools -> Options -> Editor -> Formatting -> Java -> Imports
2. Select "Use Single Class Imports" and Check "Import Inner Classes" (leave the other UNCHECKED)
3. Open the file imports.Imports
4. Inside the class type "Inner":
    public class Imports {
        Inner
5. From the code completion int select add import for imports.anotherpackage...

Expected Result:
The identifier 'AuxClass.Inner" is pasted at the cursor position and 'import imports.anotherpackage.AuxClass;' is added.

    import imports.anotherpackage.AuxClass;
    public class Imports {
        AuxClass.Inner

Actual Result:

    import imports.anotherpackage.AuxClass.Inner;
    public class Imports {
        Inner
Comment 1 Jiri Prox 2015-08-24 14:22:20 UTC
I've just tested it and it works fine for me. Is it reproducible always or is it random?
Were the changed in the options dialog correctly applied?
Comment 2 -Silver- 2015-08-24 14:57:42 UTC
I tried again and following the steps that I reported to reproduce it worked.
Then I started to play with the import options and again, selecting "Use single Class Import" and "Import Inner Classes" doesn't work anymore.
I suppose that selecting something different broke the functioning. 
I try again with a clean profile to see if I can find a precise sequence of steps.
Comment 3 -Silver- 2015-08-24 15:15:25 UTC
Mmmh no, 
I think I was wrong.
I run the test again some with a clean profile many times but it works. 
Probably I make a mistake during the test. 
Reading again the description that I wrote and the steps to reproduce it seems that there was not an issue and I was expecting a wrong result but I obtained the correct one.
Sorry for the wrong reporting. 
I close it as invalid.
Best regards,


--
Giuseppe Tino