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 234521 - paste command is a no-op in otherwise editable file
Summary: paste command is a no-op in otherwise editable file
Status: RESOLVED DUPLICATE of bug 230061
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-17 00:37 UTC by jrose
Modified: 2013-09-03 20:15 UTC (History)
1 user (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 jrose 2013-08-17 00:37:50 UTC
The paste command (Command-V, Command-I Paste-Action) does not work properly with the system clipboard, when the clipboard has been loaded by the NetBeans Editor itself.

Background:  If I copy text in another application (TextEdit, Safari, Aquamacs), the Command-V key will paste the clipboard contents into the NB editor.  That is good.  If I copy text from the NB editor (Command-C, etc.), I can paste it into other applications.  Good again.

But if I try to paste text from the NB editor to the same editor, nothing happens.  It is a no-op, as if there were nothing on the clipboard.  But I can go to another app., paste the text, recut it, go back to the NB editor, and *then* the paste command works.

This happens with both the keyboard shortcut and the named action (accessed by Command-I).  It also happens if I bind the Paste action to another shortcut.

I have observed this in both jdk8lambda-1804 and 7.4beta, editing JDK 8 sources and other Java code on Mac 10.8.4.

Workaround:  Bind Paste-From-History to Command-Shift-V or Control-V to get quick access to the local history, as a substitute for the system clipboard.
Comment 1 Svata Dedic 2013-08-22 13:03:15 UTC
Could you please provide the exact NetBeans + JRE version where you can observe the defect ? Ideally attach the var/message.log to this defect.

Is the behaviour consistent ? If the issue appears on JDK8 builds only - could you briefly check if other Swing applications (jEdit, SwingSet demo) behaves correctly ?
Comment 2 jrose 2013-08-23 04:48:02 UTC
After a clean launch of NB 7.4 Beta the bug manifests.

Here's the "about" info:

Product Version: NetBeans IDE 7.4 Beta (Build 201307092200)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b44
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b102
System: Mac OS X version 10.8.4 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/jrose/Library/Application Support/NetBeans/7.4beta
Cache directory: /Users/jrose/Library/Caches/NetBeans/7.4beta

I ran demo/jfc/Notepad/Notepad.jar on the same JRE and verified that cut and paste work as expected, using Control-C and Control-V.



As a bonus, I also tried cutting and pasting between two versions of Netbeans.  Neither NB could witness a clipboard string from the other.  Both could witness one from Emacs and vice versa (Emacs from either NB).

The other NB uses a JRE I built a few weeks ago.

Product Version: NetBeans IDE Dev (Build jdk8lambda-1804-on-20130816)
Updates: Updates available
Java: 1.8.0-internal; OpenJDK 64-Bit Server VM 25.0-b36
Runtime: OpenJDK Runtime Environment 1.8.0-internal-jrose_2013_06_11_16_02-b00
System: Mac OS X version 10.8.4 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/jrose/Library/Application Support/NetBeans/dev
Cache directory: /Users/jrose/Library/Caches/NetBeans/dev

HTH
Comment 3 Svata Dedic 2013-09-03 20:15:51 UTC
Really sounds as a JDK8 or NB platform problem. I've checked the behaviour on JDK 7 (1.7.0_40) and copy/paste worked OK.

*** This bug has been marked as a duplicate of bug 230061 ***