| Summary: | Introduce a common base class for operations that allows checking the operation for any effects. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | GEF MVC | Assignee: | Matthias Wienand <matthias.wienand> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.1.0 | ||
| Target Milestone: | 4.0.0 / 3.11.0 (Neon) M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Matthias Wienand
I decided not to introduce a new base class, but rather define a new interface for operations which can be checked for having an effect. The new interface is called ITransactionalOperation. It defines one method isNoOp():boolean. When executing an operation via the domain (i.e. domain.execute(operation)) the operation is simplified as much as possible: 1. If it is a composite operation, it is unwrapped. 2. If it is a transactional operation, it is not executed if it is a no-op. Therefore, users do not have to tediously clean-up their operations, but instead, the domain will take care of that when an operation is executed. An operation with no effects will not be added to the undo-stack. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.11.0M2. |