Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315703

Summary: using undo/redo from a pure e4 app
Product: [Eclipse Project] e4 Reporter: Susan McCourt <susan>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED WORKSFORME QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: pwebster, remy.suen
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Susan McCourt CLA 2010-06-03 20:00:14 EDT
we don't have time to revisit undo/redo API's for Eclipse 4.0.
However we need to ensure that a pure e4 app (such as the simple IDE) can participate in undo/redo without needing anything from the compatibility layer.

The core code is in org.eclipse.core.commands.
However there is workbench level support and we need to see if any of that needs to be pushed into EAS API.
Comment 1 Eric Moffatt CLA 2010-06-04 14:04:35 EDT
Undo/Redo is an interesting case. Originally it was tightly tied to only editors but has just recently been extended to operate against various resource operations as well...

It mostly seems to be tied into how the Commands infrastructure resolves the current handler for 'undo' from its candidates.
Comment 2 Susan McCourt CLA 2010-06-09 12:04:23 EDT
(In reply to comment #1)
> Undo/Redo is an interesting case. Originally it was tightly tied to only
> editors but has just recently been extended to operate against various resource
> operations as well...
> 
> It mostly seems to be tied into how the Commands infrastructure resolves the
> current handler for 'undo' from its candidates.

Yeah, I did that work (I think it was 3.2) to bring text undo and other undo together.  In theory there should be no problem using the basic UndoableOperation from e4.  We put the undo support in the commands bundle simply because they had similar dependencies.  So I think apps can simply use the undo part of the commands bundle, but there are some action handlers and such in workbench that work with the undo stack.  I just need to review that there is nothing missing or nothing that needs to be changed in the e4 branch of the workbench...
Comment 3 Susan McCourt CLA 2010-06-09 12:21:17 EDT
(In reply to comment #2)
>I just need to review that
> there is nothing missing or nothing that needs to be changed in the e4 branch
> of the workbench...

meant to say...there may be something in the e4 branch of workbench that we need to extract so that a pure e4 app can work with undo.  This might mean it's time to fix bug 184607.
Comment 4 Paul Webster CLA 2010-06-21 13:33:05 EDT
(In reply to comment #3)
> meant to say...there may be something in the e4 branch of workbench that we
> need to extract so that a pure e4 app can work with undo.  This might mean it's
> time to fix bug 184607.

At least for the moment, a pure e4 app can see the Command and Undo APIs, as ECommandService deals in org.eclipse.core.commands objects (just the libraries, not the extension points).

PW
Comment 5 Dani Megert CLA 2013-06-05 10:25:35 EDT
Removing outdated target milestone.
Comment 6 Eclipse Genie CLA 2018-09-27 17:06:54 EDT
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.

--
The automated Eclipse Genie.
Comment 7 Lars Vogel CLA 2019-06-05 07:32:02 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.