Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Redo add feature leads to an empty dirty diagram
Redo add feature leads to an empty dirty diagram [message #1457611] Fri, 31 October 2014 14:09 Go to next message
Laurent Le Moux is currently offline Laurent Le MouxFriend
Messages: 184
Registered: September 2011
Senior Member
Hi all,

I have got the following problem. I implemented an add feature similar to the Graphiti tutorial one.
It works great and so does the undo action.
But redo does not add my pictogram element back to the diagram which is however marked as dirty.

In the debugger, I tried to get an idea of my digram content with the following results :

Before add : clean empty diagram whose content is displayed as the following array in the debugger
[null, [], [], null, [], [Color@OID70, Color@OID71], null, []]

My diagram is stored in CDO. OIDxx stands for the CDO ID of each object.

After AbstractFeatureProvider.addIfPossible : the following new CDO objects populate my dirty diagram
[null, [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]

At this stage, everything looks normal and the PE is correctly displayed.

Before undo : dirty diagram
[[], [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]

Surprisingly, the first null entry has been replaced by an empty array...

After undo : except null replaced by the empty array, we are back to the initial diagram content which is marked as clean
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]


Berfore redo : clean diagram (fair enough...)
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]


After redo : dirty diagram and here, everything goes messy...
[[], [], [], null, [], [Color@OID70, Color@OID71, Color@oid17[NEW], Color@oid18[NEW], Color@oid19[NEW]], [], [PictogramLink@oid21[NEW], PictogramLink@oid24[NEW]]]

Colors and pictogram links have correctly been added back (with their new cdo IDs) but the container shape and the font objects are missing...

Any idea why this happens or where to look ?

Kind regards,

Laurent
Re: Redo add feature leads to an empty dirty diagram [message #1463402 is a reply to message #1457611] Thu, 06 November 2014 14:27 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Not really...

We are relying fully on EMF Transactions and its recording feature for
undo/redo. I have not seen something like that before and can only assume a
wild co-incidence between CDO and EMF Transactions.

Michael
Previous Topic:why my icon is not showing in the shape ?
Next Topic:Updating decorators need a shape to be moved
Goto Forum:
  


Current Time: Wed Apr 24 21:22:51 GMT 2024

Powered by FUDForum. Page generated in 0.04545 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top