Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 125437 - [Commands] handlers: TextActionHandler does not properly maintain enablement of its delegate actions
Summary: [Commands] handlers: TextActionHandler does not properly maintain enablement ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262615
  Show dependency tree
 
Reported: 2006-01-26 22:54 EST by Peter Nehrer CLA
Modified: 2009-01-27 13:13 EST (History)
0 users

See Also:


Attachments
Proposed patch to fix the outlined problems (3.72 KB, patch)
2006-01-26 22:55 EST, Peter Nehrer CLA
pwebster: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nehrer CLA 2006-01-26 22:54:25 EST
In order to synchronize enablement behavior of global clipboard actions managed by TextActionHandler with Text control's native context menu, the following rules should be observed:

1. Cut, Paste and Delete should only be enabled for editable Text fields
2. In addition, Paste should only be enabled if there is textual content on the clipboard
3. Select All should only be enabled when there is at least one character in the Text control

Furthermore, TextActionHandler does not properly update enablement in its addText(Text) method. For one, it assumes that the Text control being added is currently active, OR that this method will be called before set<Action>(IAction) methods are (which properly update enablement). This may not be the case, particularly in scenarios where the global actions are shared (e.g., editor's action bar contributor) and controls are added only after the actions have been set.

This is in follow-up to bugs.eclipse.org/bugs/show_bug.cgi?id=124673. Apparently, I didn't catch all of the problems with TextActionHandler. A proposed patch is attached.
Comment 1 Peter Nehrer CLA 2006-01-26 22:55:10 EST
Created attachment 33686 [details]
Proposed patch to fix the outlined problems
Comment 2 Michael Van Meekeren CLA 2006-04-21 13:21:10 EDT
Moving Dougs bugs
Comment 3 Paul Webster CLA 2009-01-25 09:19:41 EST
Released to HEAD >20090125
PW
Comment 4 Paul Webster CLA 2009-01-27 13:13:03 EST
verified using the tests in bug 262615

on I20090127-0100