When VirtualBox updates the clipboard, Netbeans appears to use a chached copy, not the most current contents.
THIS ONLY HAPPENS WITH NETBEANS. Paste works fine in other programs (e.g. gedit).
Host OS: Ubuntu 9.10
Guest OS: Ubuntu 9.10 (with Guest Additions)
Virtualbox: 3.0.8_OSE (from Ubuntu Software Center)
Netbeans: Both 6.7.1 (from USC), and 6.8
1) Guest OS: copy anything.
2) Host OS: Firefox (3.5.5) copy code
3) Guest OS: Netbeans paste code
FAIL: netbeans pastes in whatever was in step 1.
EXPECTED: What was copied in step 2.
1) Host OS: Firefox
- copy code
2) Guest OS: Gedit (default text editor)
- paste code (no need to recopy)
3) Guest OS: Netbeans
- paste code (pastes the right code).
I think something in Netbeans is caching the clipboard, and not checking the current contents.
We have several projects we develop (each inside different VBox machines), so this is a real obstacle to using Netbeans across our company.
Anyways, this is *hugely* annoying. Especially considering how much I like Netbeans and encourage others where I work to use it.
Replace default-jdk (openjdk) with sun-java6-jdk
(In reply to comment #1)
> Workaround 2:
> Replace default-jdk (openjdk) with sun-java6-jdk
This isn't true. Replacing the JDK didn't fix. Most likely it was rebooting that fixed it intermittently. Anyways, it's back.
netbeans synchronizes its internal clipboard with the system one only when the main window is activated - for performance reasons.
when running in virtual box then netbeans window doesn't get deactivated and activated when copying content to clipboard from some other application so it keeps its stale, cached content.
Ok, I'll try a workaround of deactivating the window when this happens...
Given the last comments here, closing as wontfix.
We should not change the clipboard poling policy for performance reasons.
> Given the last comments here, closing as wontfix.
> We should not change the clipboard [polling] policy for performance reasons.
This is not an acceptable answer. There are more options besides "leave it broken" and "poll constantly and kill performance." For example, you can update the clipboard during the "Paste" operation. Yes, it may slow down the intial paste operation, but probably not as much caused by manually deactivating and reactivating the NB window--to say nothing of the productivity cost this issue causes a programmer. A malfunctioning paste is a useless paste.
> you can update the clipboard during the "Paste" operation
Stando, please evaluate this possibility. Thanks.
(In reply to comment #6)
> broken" and "poll constantly and kill performance." For example, you can update
> the clipboard during the "Paste" operation.
that means the paste action would be always enabled, even when there's no clipboard content to paste.
Are yall actually serious about this? Copy/paste doesn't work!
If you're going to half-ass that, then stop updating the bugs and go outside and play. There's no need to continue working on NetBeans or editing the bugs.
In response to paste always being visible, that's better than it NOT WORKING!
Re: performance, someone, somewhere can figure this out. Just because you can't doesn't mean close the bug.
it does work
just because you have a corner case doen't mean we break the for other users
a patch is welcome of course