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 58666 - Ctrl+V paste command executes twice
Summary: Ctrl+V paste command executes twice
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: RANDOM
: 57520 59829 60972 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-07 09:10 UTC by randahl
Modified: 2008-12-23 00:39 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description randahl 2005-05-07 09:10:13 UTC
Using the 4.1 RC I have at least four times since its release experienced that
selecting paste from the popup of the project view or the form designer window
have resulted in two instances of the same object being pasted. This has
happened when using the Ctrl+V shortcut too.

I have not yet found a particular situation in which this happens, but last time
it occurred was when I tried to duplicate an XML file in a package by copying it
and then pasting it into the same package. This created two new nodes

originalNodeName_1.xml
originalNodeName_2.xml

instead of just one node as expected.

If you think like me, you might think this behavior must be specific to my use
of NB or to some error on my machine - the error does not occur always, so it
seems likely that it is caused by me pasting in some improper way; I admit, I
cannot rule out this possibility. However, I would like to add that I have not
experienced this double pasing in any other application nor in any previous
versions of NB.

I will ask users on the nbuser list to vote for this if they experience this too.

Randahl
Comment 1 randahl 2005-05-07 09:48:19 UTC
This just happened again when renaming a package using refactoring. This leads
me to believe the error is not related to my use of NB or my machine.

Randahl
Comment 2 fifth 2005-05-09 23:51:34 UTC
I have also noticed this behaviour within the source editor. Perhaps not limited
to my experience, but usually happens when pasting code into/over an existing
file. The problem does not always arise - have been unable to determine a pattern.

Also noticed that the 'Paste' context menu is grayed out a lot of the time and
CTRL+V is the only method available. This doesn't seem to be just the editor
window, same applies to NB's dialog boxes and property editors.
Comment 3 Roman Strobl 2005-05-11 09:56:08 UTC
This issue seems to be similar to issue 57520. It could be also related to issue
49947. It seems to be a more general issue, there are such reports outside
editor, too.

I have received one another report from a user who was experiencing double
pasting. I was never able to reproduce it. Randahl and Chris_pm, which OS do you
have and which JDK do you use? Thanks.
Comment 4 randahl 2005-05-11 10:41:26 UTC
As stated my os is Windows XP
I use J2SE5:

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)


R.
Comment 5 Martin Roskanin 2005-05-30 09:53:45 UTC
*** Issue 57520 has been marked as a duplicate of this issue. ***
Comment 6 Martin Roskanin 2005-05-30 10:26:06 UTC
It doesn't seem to be an editor issue. Problem with duplicating paste action
appears not only in editor (issue #57520) but also in explorer (problem
mentioned in this issue) Reassigning to openide for evaluation.
Comment 7 David Simonek 2005-05-30 12:41:01 UTC
I guess this belongs more to openide/actions. 
Comment 8 Jiri Rechtacek 2005-06-13 13:16:33 UTC
Not reproducible in Dev Build 050613.
Comment 9 randahl 2005-06-13 14:00:44 UTC
That does not mean the error does not exist - as mentioned this does not happen
often, but it really *does* happen occasionally. Maybe you just got lucky. Could
it be OS dependant? I am using NB on a WinXP box.

It happened to me yesterday, so if nothing has changed since the 4.1 release
(which I am using) the bug is still in there somewhere.

R.
Comment 10 Marian Mirilovic 2005-06-15 14:59:58 UTC
It happend to me once or twice, right after startup the IDE I tried to
Copy/Paste a file from one directory to the second one and there has been
created two files one with suffix _1....
Comment 11 Petr Nejedly 2005-06-22 11:27:14 UTC
*** Issue 59829 has been marked as a duplicate of this issue. ***
Comment 12 randahl 2005-07-12 10:23:32 UTC
This issue also applies to the latest qbuild of 4.2.

R.
Comment 13 Jiri Rechtacek 2005-07-14 12:58:05 UTC
*** Issue 60972 has been marked as a duplicate of this issue. ***
Comment 14 Jiri Rechtacek 2005-07-14 12:59:47 UTC
Quoted from 60972:
If you copy and paste a file, there are created two new instances of copied
file. It started to happen in build 20050714-0819. Maybe it is connected with
issue 60971.
To reproduce:

- create a new J2SE project
- select Main.java and call Copy popup action
- select package node and call Paste popup action
- two files are created Main_1.java and Main_2.java. It behaves the same for all
file types and all folders.

Build 20050714-0819, JDK1.5.0_04.


Comment 15 Jiri Skrivanek 2005-07-14 13:05:46 UTC
From build 20050714-0819 it is not random but regular.
Comment 16 randahl 2005-07-14 13:45:28 UTC
If you by "regular" mean that it happens consistently - i.e. everytime you copy
a file in a folder and paste a file into that same folder two files are created
- then you are wrong. I am currently using qbuild 200506211800 and this error
happens randomly: Sometimes I can copy and paste a file without problems and
sometimes I cannot do so without getting two files named "..._1" and "...2".

I just want to keep stressing the fact that the bug is random to make sure that
noone thinks this bug must be solved just because a few consequent copy/paste
operations happen to work.

Randahl
Comment 17 Jiri Skrivanek 2005-07-14 16:01:37 UTC
Issue 60971 which caused that it happened consistently was fixed. There was an
exact reason not connected with issue 58666. So, issue 58666 is probably still
random.
Comment 18 Jiri Rechtacek 2005-09-15 13:50:00 UTC
After fix issue 60971 I'm not able to reproduce on demand. IMHO I can close as
WORKSFORME. For further investigation I have added some log code in
DataTransferSupport. If anybody can reproduce on builds NB5.0 - 050916 or later
please run it with run option -J-D-J-Dorg.openide.loaders.DataTransferSupport=-1
and attach the messages.log. Thanks

Checking in openide/loaders/src/org/openide/loaders/DataTransferSupport.java;
/cvs/openide/loaders/src/org/openide/loaders/DataTransferSupport.java,v  <-- 
DataTransferSupport.java
new revision: 1.8; previous revision: 1.7
done