Bug 69844 - [KeyBindings] misc: StyledText component Copy action, Ctrl+C , does not work if Java Editor open as well
Summary: [KeyBindings] misc: StyledText component Copy action, Ctrl+C , does not work ...
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-12 10:49 EDT by CLA
Modified: 2019-09-06 15:30 EDT (History)
1 user (show)

See Also:


Attachments
Zip of a project containing a styled text view (5.65 KB, application/octet-stream)
2004-07-14 17:54 EDT, Douglas Pollock CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description CLA 2004-07-12 10:49:15 EDT
I have developed an Eclipse Plugin with a View containing a StyledText 
component declared as:

StyledText textPane = new StyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL);
textPane.setEditable(false);
textPane.setTabs(40);
textPane.setText("Some long text...");

This displays read-only text which when I select with Ctrl-C is correctly 
copied to the Windows clipboard and available to Paste in other apps.  
However, selecting different text in the component and pressing Ctrl-C fails 
since the original copy buffer is not replaced with the new selection.  Only 
the first ever copy selections is retained.

The strange thing is that this works OK when I am testing my Plugin and launch 
it in another Runtime Workbench for testing.

PB
Comment 1 CLA 2004-07-12 13:46:21 EDT
I have narrowed it down to a conflict that happens when a Java file is open at 
the same time as a plugin view containing a StyledText component:

If I just have my Plugin View open with no Java files open, the Ctrl-C 
copy/paste from the StyledText component in my plugin works every time.

If I then open a Java file in the Java perspective and leave it open, the 
copy/paste from the StyledText component in my plugin does not work.  However, 
if I then highlight some text in the Java Editor and leave it highlighted, the 
copy/paste works from the StyledText component.

PB
Comment 2 CLA 2004-07-12 15:20:50 EDT
Some more information:

Ctrl+Insert key works OK, Ctrl+C does not.  Maybe the Java Editor is stealing 
the Ctrl+C key binding from the StyledText component?

PB
Comment 3 Veronika Irvine CLA 2004-07-12 16:53:10 EDT
This is caused by the key bindings in Eclipse.  Moving to UI team.
Comment 4 Douglas Pollock CLA 2004-07-14 17:49:32 EDT
I can reproduce this problem using Linux-GTK+.  I will attach a plug-in that 
shows the problem. 
Comment 5 Douglas Pollock CLA 2004-07-14 17:54:38 EDT
Created attachment 13273 [details]
Zip of a project containing a styled text view

Steps to reproduce:
1.) Import the zip file into your workspace and launch a self-hosted session.
2.) Open the view "Test Views > Styled Text Views".
3.) Copy some text from the view
4.) Paste into a Java editor
5.) Try to copy some more text.  The text is not copied (checked klipper,
Eclipse and external apps).

Once in this state, there doesn't seem to be anyway of restoring sanity.
Comment 6 CLA 2004-07-14 20:27:14 EDT
Then try closing the Java Editor, or selecting some text in the Java Editor, 
and sanity is restored.  At least on Windows it is.

PB
Comment 7 Michael Fraenkel CLA 2004-07-14 23:35:00 EDT
You will also notice that most of the commands/actions are disabled in the 
Edit menu including Copy.
Comment 8 Michael Van Meekeren CLA 2006-04-21 13:14:28 EDT
Moving Dougs bugs
Comment 9 Paul Webster CLA 2006-09-28 15:13:47 EDT
Is this still a problem in 3.3?

PW
Comment 10 Denis Roy CLA 2007-06-22 09:32:40 EDT
Changes requested on bug 193523
Comment 11 Eclipse Webmaster CLA 2019-09-06 15:30:07 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.