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

Summary: Autocompletion and guibuilder forget to import class
Product: guibuilder Reporter: skygo <skygo>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:

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.