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.
[ BUILD # : 201109110600 ] [ JDK VERSION : 1.6.27 ] Hi, when I copy between Java source editor windows, the copied code in the destination window is not complete if the SOURCE MODULE is not listed in the DESTINATION module libraries. In the picture 1 there is the source module window. I copy one line. In the picture 2, the IDE ask me if I want to add the correct import. I say yes. In the picture 3, there is the destination module window where the copied code has been edited to remove all references to the source module which brings to not correct code. Two comments: * The copy function which cleverly detects the missing import and ask me to add it, it should be also ask me if I want to add the source module as library for the destination module (or it should stop the copy). * By chance I pressed the "Undo" AFTER the copy and in the destination window I have got the same code as in the source editor. Gualtiero
Created attachment 110648 [details] Picture 1
Created attachment 110649 [details] Picture 2
Created attachment 110650 [details] Picture 2
Created attachment 110651 [details] Picture 3
Shouldn't try to import unresolvable elements: http://hg.netbeans.org/jet-main/rev/ac972bec50ea
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/ac972bec50ea User: Jan Lahoda <jlahoda@netbeans.org> Log: #201993: do not try to import unresolvable Elements.