Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 52880

Summary: [EditorMgmt] DeleteActionHandler.runWithEvent() should not call Text.clearSelection()...
Product: [Eclipse Project] Platform Reporter: P <4g3xdnq02>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P5    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description P CLA 2004-02-23 18:46:56 EST
DeleteActionHandler.runWithEvent() in TextActionHandler.java currently calls 
Text.clearSelection().

What this means is that if the user chooses Delete from the Edit menu when an 
editor with an active (owns the keyboard focus) Text widget is present, the 
behaviour is that nothing happens.

The expected behaviour is to have the selection be removed/deleted.

The workaround is possibly to write your own handler.

It seems that this problem exists in versions 2.1.1, 2.1.2, and 3.0M7.

On a related note: CutActionHandler.updateEnabledState() should disable the 
action if the Text is non-editable/disabled.
Comment 1 Debbie Wilson CLA 2004-02-24 10:10:07 EST
Chris, This doesn't look like it belongs to Platform/Text.  If this isn't the 
right component, please reassign.
Comment 2 P CLA 2004-02-24 16:16:57 EST
The possible fix for the incorrect call to Text.clearSelection() is to replace 
it with a call like Text.insert("") (which should have probably been named 
Text.replace()).
Comment 3 Douglas Pollock CLA 2004-07-15 15:54:23 EDT
Could you provide a small test case showing the problem? 
 
Comment 4 Michael Van Meekeren CLA 2006-04-21 13:19:03 EDT
Moving Dougs bugs
Comment 5 Susan McCourt CLA 2009-07-09 19:03:50 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 6 Boris Bokowski CLA 2009-11-17 13:03:52 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 7 Remy Suen CLA 2010-12-15 13:18:54 EST
This seems to have been fixed by bug 124673.

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