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 252646 - Autocompletion and guibuilder forget to import class
Summary: Autocompletion and guibuilder forget to import class
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Other
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-28 12:44 UTC by skygo
Modified: 2015-05-28 12:44 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 skygo 2015-05-28 12:44:29 UTC
In the GUI Builder after editing pre-declaration code to add a custom annotation the needed class is found but not imported in the import section of the java file.

This mismatch with the usage on non graphical autocompletion.

Step to reproduce
 1 new java project
 2 add JFRame
 3 add a button
 4 create a package 
 5 add an annotation Dummy
 6 edit properties of the button code pre-declaration and use autocompletion to find Dummy, 

Code is well created the line :
@Dummy
    private javax.swing.JButton jButton1;

But Dummy is not imported

On a non graphical usage using autocompletion and finding Dummy annotation will create the import line

Workaround: "fixing import" is a workaround but make Netbeans a bit incoherent.