Community
Participate
Working Groups
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.
-All- the actions?
Yup, every one of them, although I didn't check in the submenus "Convert Line Delimiters" and "Encoding".
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.
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.
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.
Understood. (And yes, the other editor was a Java editor). I'll try to find reproducable steps but it hasn't happened since.
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.
The file was definitely not read-only.
Have you see this agian? If not I suggest we close as I cannot make it occur.
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.
Haven't seen this. Will reopen if I see it again.
*** Bug 16588 has been marked as a duplicate of this bug. ***
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).