I basically have the following:
<menuContribution locationURI="menu:com.myprog.menus.edit?after=undo">
<command commandId="org.eclipse.ui.edit.undo" label="Undo" style="push">
</command>
<command commandId="org.eclipse.ui.edit.redo" label="Redo" style="push">
</command>
</menuContribution>
================================
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar id="com.myprog.ui.undo">
<command commandId="org.eclipse.ui.edit.undo" label="Undo" style="push">
</command>
<command commandId="org.eclipse.ui.edit.redo" label="Redo" style="push">
</command>
</toolbar>
</menuContribution>
This is a Eclipse 3.X RCP running using the compatibility layer on Eclipse 4.
The problem is that when I open any of my text editors the undo/redo toolbar buttons doesn't become enabled or disabled correctly unless I use the mouse to select mutliple lines or when I click on any other tab (project explorer for example) and then click back into the editor.
Knowing that this happens I expected the Edit menu undo/redo to be messed up as well, but I found that they are enabled and disabled correctly according to what I do in the editor.
Also it should be noted that no matter what is the state of the toolbar undo/redo buttons, keyboard shortcuts Ctrl+Z and Ctrl+Y work as expected.
What can be possibly causing this? To have the toolbar buttons only not working is so weird. I would have felt better if all the undo/redo mechanism didn't work.