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 201993 - Java code copy between modules not correct
Summary: Java code copy between modules not correct
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 09:11 UTC by gualtiero65
Modified: 2011-09-14 06:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Picture 1 (52.85 KB, image/png)
2011-09-12 09:11 UTC, gualtiero65
Details
Picture 2 (205.84 KB, image/png)
2011-09-12 09:11 UTC, gualtiero65
Details
Picture 2 (26.31 KB, image/png)
2011-09-12 09:12 UTC, gualtiero65
Details
Picture 3 (13.59 KB, image/png)
2011-09-12 09:12 UTC, gualtiero65
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gualtiero65 2011-09-12 09:11:00 UTC
[ 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
Comment 1 gualtiero65 2011-09-12 09:11:24 UTC
Created attachment 110648 [details]
Picture 1
Comment 2 gualtiero65 2011-09-12 09:11:52 UTC
Created attachment 110649 [details]
Picture 2
Comment 3 gualtiero65 2011-09-12 09:12:29 UTC
Created attachment 110650 [details]
Picture 2
Comment 4 gualtiero65 2011-09-12 09:12:49 UTC
Created attachment 110651 [details]
Picture 3
Comment 5 Jan Lahoda 2011-09-13 16:01:14 UTC
Shouldn't try to import unresolvable elements:
http://hg.netbeans.org/jet-main/rev/ac972bec50ea
Comment 6 Quality Engineering 2011-09-14 06:25:13 UTC
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.