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.
Created attachment 154883 [details] Error flags after copy paste
Product Version: NetBeans IDE 8.1 Beta (Build 201507231027) Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16 System: Windows 8 version 6.2 running on amd64; Cp1252; en_GB (nb) Copy/Paste of components between design views will sometimes cause error flags to appear in the pasted view. The error flags can be duplicated and do not offer appropriate correcting imports even though these are available from referenced libraries. Screen grab attached shows numerous references to Color class - but does not offer an import.
Can you provide steps how to reproduce it? For me GUI builder generates fully qualified names always. From the screenshot it looks like you have some custom component that generates its own code that uses short names. It is possible to switch GUI builder to short names, it then automatically adds imports (this works for me). But the GUI builder always expects the generated code provided by property editors always uses fully qualified names. They can be shortened by GUI builder when switched to short names, but they must originally be fully qualified. I'd actually recommend to keep the GUI builder in FQN mode. Anyway, nothing from this explains why there is no import offered. I cannot reproduce that myself (if I use short names and delete an import, the error icon that appears always offers to add the import again). So we need exact steps to reproduce this problem (there must be some special condition) to be able to do anything here... Thanks.