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.
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
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
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.
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.
As stated my os is Windows XP I use J2SE5: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) R.
*** Issue 57520 has been marked as a duplicate of this issue. ***
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.
I guess this belongs more to openide/actions.
Not reproducible in Dev Build 050613.
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.
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....
*** Issue 59829 has been marked as a duplicate of this issue. ***
This issue also applies to the latest qbuild of 4.2. R.
*** Issue 60972 has been marked as a duplicate of this issue. ***
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.
From build 20050714-0819 it is not random but regular.
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
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.
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