Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 20483 - [Contributions] Cut/copy/paste (and others) disabled in text editor
Summary: [Contributions] Cut/copy/paste (and others) disabled in text editor
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux-Motif
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Randy Giffen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-17 14:01 EDT by James Moody CLA
Modified: 2002-09-05 14:27 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Moody CLA 2002-06-17 14:01:29 EDT
I20020617
I somehow got my text editor into a state where all the actions in the edit menu
are disabled! Switching editors doesn't make any difference. Closing and
reopening the editor fixed the problem.
Comment 1 Nick Edgar CLA 2002-06-17 16:08:01 EDT
-All- the actions?
Comment 2 James Moody CLA 2002-06-17 16:10:50 EDT
Yup, every one of them, although I didn't check in the submenus "Convert Line
Delimiters" and "Encoding".
Comment 3 Randy Giffen CLA 2002-06-18 09:57:05 EDT
The fact that switching editor's did not help suggests that it was not a case 
of the workbench page not having the text editor as its active part or a 
problem with the enablement overrides (the enablement overrides should only 
affect editor contributions not global actions).

I assume all of the editor contributions were present but disabled (find next, 
find previous, incremental find, goto line, convert line delimiters, encoding).

The enablement of the global actions in the menu (cut, copy, etc.) is 
controled by whether the active part has supplied a handler and the enablement 
of the handler. The enablement of the contributed actions is controlled by the 
contributor and/or the actions themselves. Thus it may be a problem related to 
the contributor but it is difficult to know without a repeatable case.
Comment 4 James Moody CLA 2002-06-18 10:04:17 EDT
I didn't state the original clearly:
Switching to another editor and then switching back doesn't make any difference.
But the 'other editor' was fine - i.e. it had correct enablement in the Edit
menu. It was just the original editor that was bogus.

Sorry for the confusion.
Comment 5 Randy Giffen CLA 2002-06-18 10:14:52 EDT
Yes, this is what I had understood.
The point is that since the enablement is correct with the other editor (I 
assume the other editor was a Java editor rather than an other text editor), 
suggests the problem lies with the editor contributor mechanism rather than 
with action switching/enablement in the workbench page.
Comment 6 James Moody CLA 2002-06-18 10:22:40 EDT
Understood. (And yes, the other editor was a Java editor). I'll try to find
reproducable steps but it hasn't happened since.
Comment 7 Nick Edgar CLA 2002-06-18 13:52:58 EDT
If it was a read-only file, then the text editor disables all modification 
actions.  However this does not explain -all- actions being disabled.
Non-modifying actions like Select All and Find should still be enabled.

Comment 8 James Moody CLA 2002-06-18 14:07:56 EDT
The file was definitely not read-only.
Comment 9 Randy Giffen CLA 2002-07-22 11:21:30 EDT
Have you see this agian? If not I suggest we close as I cannot make it occur.
Comment 10 James Moody CLA 2002-07-27 18:34:02 EDT
Can you leave open for a bit please? I was away 3 weeks on vacation and 1 week 
on a conference, so I haven't actually even used the workbench for a bit. If I 
don't see by the end of this coming week, we should definitely close.
Comment 11 James Moody CLA 2002-08-28 10:12:28 EDT
Haven't seen this. Will reopen if I see it again.
Comment 12 Simon Arsenault CLA 2002-09-05 12:28:25 EDT
*** Bug 16588 has been marked as a duplicate of this bug. ***
Comment 13 Randy Hudson CLA 2002-09-05 14:27:27 EDT
I have no idea why my Bug was marked DUP of this bug.  But, one possibility for 
*this* bug is that a listener threw an exception.  Many of the services (i.e. 
PartService) will remove a "badly behaved" listener, if it throws an exception. 
Maybe the ActionBar or something got removed and wasn't made aware of the 
EditorPart re-gaining focus.  Closing the Editor would fix this if iw was the 
only open editor for that type, because the EditorActionBarContributor would 
get thrown out and recreated (and therefore re-hook its listeners).