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 253782 - Copy/Paste components not working correctly
Summary: Copy/Paste components not working correctly
Status: RESOLVED INCOMPLETE
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-07-25 10:32 UTC by bolsover
Modified: 2015-09-22 13:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error flags after copy paste (59.10 KB, image/jpeg)
2015-07-25 10:34 UTC, bolsover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bolsover 2015-07-25 10:32:10 UTC

    
Comment 1 bolsover 2015-07-25 10:34:13 UTC
Created attachment 154883 [details]
Error flags after copy paste
Comment 2 bolsover 2015-07-25 10:43:10 UTC
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.
Comment 3 Tomas Pavek 2015-09-22 13:22:32 UTC
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.