Bug 227226 - can't copy/paste swing components if kde's klipper is running
can't copy/paste swing components if kde's klipper is running
Status: RESOLVED INCOMPLETE
Product: platform
Classification: Unclassified
Component: -- Other --
7.3
PC Linux
: P3 with 1 vote (vote)
: 8.0
Assigned To: Stanislav Aubrecht
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-09 02:42 UTC by rpelting
Modified: 2013-12-09 15:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
IDE Log File (74.40 KB, text/plain)
2013-03-15 12:47 UTC, rpelting
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rpelting 2013-03-09 02:42:12 UTC
swing components cannot be pasted because the paste action in the menu is always disabled.

Steps to reproduce:
1. create a new JPanel
2. add a JLabel
3. Copy the JLabel
4. Now I want to paste the JLabel, but the "Paste" action in the context menu is disabled.

You can use the "Duplicate" function to make a copy, but this only works within
the same JPanel.
It is not possible to copy/paste a swing component to another JPanel this way.
Comment 1 Tomas Pavek 2013-03-11 18:39:13 UTC
It works for me. In fact I don't see a reason why Paste action should be disabled, unless there is some general problem with the clipboard. Are you able to reproduce it? Does the Paste action works anywhere else in the IDE (copying files of projects, or text in the editor)? Anything problems reported in the log file (menu View | IDE Log File)? If you can still reproduce the problem please attach here the log file (includes detailed system information).
Comment 2 OOMicha 2013-03-15 12:26:36 UTC
Same problem as reported by @rpelting.

While working with GUI-Editor/Navigator, you can copy components (copy menu is active) but a following paste action is inactive, in this form as well as in other forms. Similar via copy/paste-Keys C-c/C-v .
Comment 3 rpelting 2013-03-15 12:44:54 UTC
(In reply to comment #1)
> It works for me. In fact I don't see a reason why Paste action should be
> disabled, unless there is some general problem with the clipboard. Are you able
> to reproduce it? 

Yes, it is reproducable.

> Does the Paste action works anywhere else in the IDE (copying
> files of projects, or text in the editor)? 

Copy&Paste works fine in the TextArea (eg Java Editor).

> Anything problems reported in the
> log file (menu View | IDE Log File)? 

No, there are no problem reports in the IDE Log File.


> If you can still reproduce the problem
> please attach here the log file (includes detailed system information).

I have tried it with 

$ java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

and

java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

In netbeans-7.2 the paste works fine.
Comment 4 rpelting 2013-03-15 12:47:26 UTC
Created attachment 132643 [details]
IDE Log File
Comment 5 rpelting 2013-03-18 10:38:38 UTC
It seems that the new feature "Edit" > "Paste from History" has problems
with the KDE clipboard manager "Klipper".

If Klipper is running, and there is at least one element on the clipboard,
then "paste" is always disabled in the gui editor.

If Klipper is not running, then "paste" in the gui editor works fine.

Environment:
openSUSE 12.2 (x86_64)
Klipper Version v0.9.7
KDE 4.8.5 (4.8.5) "release 2"
Comment 6 Milutin Kristofic 2013-03-19 11:50:09 UTC
Can you try a recent dev build? There have been a big change in paste history.
Comment 7 rpelting 2013-03-19 22:14:57 UTC
(In reply to comment #6)
> Can you try a recent dev build? There have been a big change in paste history.

Tested with NetBeans IDE Build 201303182300: Bug still exists.
Comment 8 Milutin Kristofic 2013-04-10 15:53:36 UTC
I made a following test - I removed paste from history from current dev version and I couldn't copy either from JPanel with Klipper. There is no connection with paste from history feature and this bug.

Returning back to guibuilder. It could be changes in NbClipboard (Bug #220997, Bug #218370, Bug #218447)
Comment 9 Tomas Pavek 2013-04-10 16:33:34 UTC
To understand it more, can you try to copy something else in the IDE that is not a text?

>> Does the Paste action works anywhere else in the IDE (copying
>> files of projects, or text in the editor)? 
>
> Copy&Paste works fine in the TextArea (eg Java Editor).

E.g. try to copy a file and paste it into a package. Thanks.

I don't see how GUI builder could directly interact with Klipper. Reassigning to platform. I can't test it myself at this moment to find where the cause really is, but this used to work in NB 7.2 and there were significant changes in NbClipboard in 7.3 that might be related.
Comment 10 Stanislav Aubrecht 2013-12-09 15:52:16 UTC
Reporter, please try copy/pasting a file in the IDE as suggested in comment #9 and reopen, thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo