Community
Participate
Working Groups
Build Identifier: I20090611-1540 I've got a TextViewer in a ViewPart (note *not* a TextEditor/EditorPart) so I can't use the code in AbstractTextEditor to create the actions. If I define an action bound to the commands for say cut/copy/paste/delete then they don't work properly (notably delete never works and cut is enabled when read only) because the command falls back on the default widget method. I was expecting the TextViewer to register command handlers base on the canDoOperation/doOperation methods but no such luck. I think this has lead to duplication, there's another TextViewerAction in the console plugin which has seemingly solved this problem by copying the actions. I'm faced with a similar prospect as is anyone else who tries to use a TextViewer outside of an AbstractTextEditor. Reproducible: Always Steps to Reproduce: This is quite simple to reproduce in an RCP app 1) Embed a read only TextViewer in a ViewPart. 2) Contribute an action bound to the cut command. 3) Cut is enabled... Similar recipe with delete and it will be disabled.
Conceptually actions/handlers are bound by the part, that's why they aren't part of JFace (Text). We would have to rework all text editor actions to take a viewer as argument or provide a copy of the existing ones.
>I think this has lead to duplication, there's another TextViewerAction See bug 321623.
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.