Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Important refactorings

Hi Camille, hi all,

On Wed, Mar 5, 2014 at 5:56 PM, LETAVERNIER Camille <Camille.LETAVERNIER@xxxxxx> wrote:

-          TransactionHelper.run(EditingDomain, Runnable)

o   Executes a safe transaction which bypasses the CommandStack (i.e. doesn’t dirty the model and is not undoable, unless it is called from an active command which is already undoable)

 

All operations on the SashWindowsManager now use the TransactionHelper (And bypass the CommandStack).


That's interesting (not that the rest of the mail is not also interesting :)).
In our SCADE System customization of Papyrus, we already did implement something like that for SashWindows management (so we'll have some "interesting" refactorings to do in the coming months).
All manipulations done on the SashWindowsManager already bypass the command-stack in SCADE System,
as having to "undo" the opening or closing of a diagram/table is something that was very weird in our context,
all the more since we do not have a SashWindow in our UI in the first place
(all Papyrus diagram/table editors are opened in there own EditorPart in SCADE System, not in a a CoreMultiDiagramEditor,
 and the model is not owned by a CoreMultiDiagramEditor, but by a project-level builder that can work without any editor opened, much like the JDT package explorer).

BTW, we were thinking of contributing our refactorings that enable to open Papyrus diagram/table editors "standalone" without the need for a CoreMultiDiagramEditor/sashes (but still leaving that possibility of course).
Would that be generally useful? It also makes the diagram/table editor lifecycle more similar to "usual" Eclipse editor which is a good thing IMHO
(parameter less constructor, passing of model-set/registry & related info via the IEditorInput in the init() function instead, etc).

Regards,
--
Alain Le Guennec, R&D Expert Engineer
SCADE System Project Manager
Esterel Technologies, a wholly-owned subsidiary of ANSYS, Inc.
Tel: +33 5 34 60 90 55
---------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. 

Back to the top