Community
Participate
Working Groups
Build Identifier: The behavior of the Undo/Redo options are different whether an element within the (Papyrus) model explorer or a diagram (e.g. class) is selected. Apparently, different stacks (or undo contexts?) are used. In general, all diagrams (of the same model) and the model explorer should operate on the same command stack and use consistent labeling. Another issue: If a command has been invoked originally from a diagram which is currently not active, this diagram should be re-activated (which is quite similiar to editing a large text: if the undo affects a part that is not visible most editors set the cursor to the original place). This should be the case, even as model edit operations can potentially affect multiple diagram - but there is a single diagram in which the original command has been issued Reproducible: Always Steps to Reproduce: 1. Select an element in the model explorer 2. Rename it. Observation: The Undo menu item only shows the label "undo", i.e. no further information which operation would be undone (unlike if the same operation is done within a diagram, see below) 4. Now select an element in a diagram. Observation: Undo is no longer available. 5. Now select an element in the model explorer: Observation: Undo is again available (and does the right thing, if called) --- 1. Make an editing operation in a diagram: Observation: undo label with additional information. 2. Select element in model explorer: Observation: undo label without additional information, but still operational.
This is linked to bug 314250.
Now the IOperationHistory is used to store executed Commands. Commands are executed in different stack, all following back on the IOperationHistory. There is a document about the Command frameworks that will be commited soon (see bug 314250). The problem of giving focus on a diagram is note treated now. A solution can be to store the diagram switch as commands.
Fixed by Cedrics modifications. Thanks