Book a Demo

Author Topic: Class Diagram undo/redo for class entries.  (Read 9659 times)

maddec

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Class Diagram undo/redo for class entries.
« on: May 10, 2008, 01:38:37 am »
Hi there this is a feature I really miss:

Class Diagram undo/redo for class inline entries.

When I have a Class element and I do inline edition(I do not mean when the inline text edition is current ), if for example I delete one parameter, I can't undo my change.
Furthermore it would be nice to add this capability to the whole Class elements' edition panel workflow.

Thank you for your interest.


Best regards.

Cedric M. (aka maddec)
« Last Edit: May 10, 2008, 07:05:41 pm by maddec »

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #1 on: May 10, 2008, 04:00:48 am »
Cedric,

I think you stirred up a hornet's nest there. Undo/redo capability is kind of arbitrary in EA und needs a thorough review.

E.g. never ever call the "Diagram-Layout Diagram" menu unless you're in a controlled package which you have just saved, so you can call the "Undo check out" menu when EA has made a complete mess of your layout.

There's a dichotomy in EA of things which are being saved to the database immediately (i.e. all changes affecting the actual model) and things only affecting diagram contents and layout, which leave you with a pending diagram (marked in the register by an asterisk following the name). My impression is that EA's undo/redo logic fails to wrap these two consistently.

Another action to be avoided by all means is to import an xmi package (or call "Get latest" on a controlled package) while you have unsaved diagrams in some other package. EA will do unpredictable things then:  some of your diagrams may still resemble the ones you've drawn, others you will hardly recognize anymore.

Of course this would rather be a case for the "Bugs And Issues" section or for an official bug report, but it's hard to reproduce and I don't always have the time for that.

Anyway though: welcome to the club of feature suggesters and bug reporters. Keep nagging them!

Regards
Frank

maddec

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #2 on: May 10, 2008, 07:03:41 pm »
Hello,

Thank you for your answers and comments.

Frank, I confess that it was very surprising at first that undo/redo was not implemented in the context I've described. But I guess that it is more complex to handle this multiple level and hierachy of "history" regarding the complexity and variety of elements mixed in EA. For example, when you edit a Class element there are plenty of way to edit the same piece of information, I guess it makes its handling more complex.
Maybe it is also a matter of context tracking, I guess it is hard for EA to define if undo is done on the whole diagram or on the currently selected Class Element data. I wonder if the fact to add buttons next to the class you are editing, allowing "local" undo/redo might be a solution? (buttons like quick link button).

Regarding the autolayout feature, it is one of the feature I turned off quickly when I started using with EA months ago. It gave me bad surprises when I reopenend complex diagrams... By the way thank you for the tip on Undo check out.


Best regards.

Cedric M. (aka maddec)


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #3 on: May 11, 2008, 02:33:33 am »
FWIW,

EA draws some parts of class diagrams on the fly each time a diagram is rendered, rather than storing the information in the database. I have only encountered this for connectors, and that is likely the limit of this behavior.

I suspect this behavior could contribute to the complexity of undo and redo for diagrams. This functionality seems limited to when a diagram is rendered or pre-existing elements are added from somewhere like the project browser. In each case it is easy for EA to look through the database when it adds each element, and add connectors as required. If EA had to do so for all open diagrams on each undo or redo things could become complex very quickly.

Of course I'm guessing, so take this with the appropriate degree of seasoning...

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #4 on: May 14, 2008, 07:41:57 am »
Quote
E.g. never ever call the "Diagram-Layout Diagram" menu unless you're in a controlled package which you have just saved, so you can call the "Undo check out" menu when EA has made a complete mess of your layout.
I would be interested to hear what can happen.  A diagram layout should be undoable.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #5 on: May 14, 2008, 05:21:45 pm »
Quote
A diagram layout should be undoable.

Looks like it is now, in a way. I seem to recall times when it wasn't.

In the current version the undo menu is indeed enabled after a diagram layout. It can't be undone in one step though. You have to press Ctrl-Z for as many times as EA has chosen it takes steps to layout the diagram. Which can be quite some steps.

Undo checkout  is much more comfortable (unless it's a big package and EA needs an hour to reload the xmi file).

Anyway though: ONE menu action should be undone with ONE undo action.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #6 on: May 14, 2008, 09:30:06 pm »
Still, this is definitely a new feature - I too remember the 'time before' - and bears mentioning.

I think I like the stepwise undo for layout, but it could certainly be cumbersome for larger diagrams.

Perhaps some future tweak could be a drop-down (or something) allowing us to undo several operations as a group. Maybe EA could track consecutive state changes related to the same operation, and offer those as a group or individual steps.

[Hopefully, if you chose the first single step - the most recent 'inner' undo operation - you would still be offered the choice of the next most recent step or the remainder of the group.]

What say, any takers?

David
No, you can't have it!

maddec

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #7 on: May 14, 2008, 09:43:44 pm »
What you describe sounds to me like the history panel found in Adobe products and other. Gives a list of every operations made step by step and then you can switch between each states.

What do you think about my suggestion on undo/redo at in list level within a Class Element (list of attributes and operations direct manipulation)?
I'd like also to have the possiblity to drag and drop  in list of attributes and operations...

Best regards.

Cedric M. (aka maddec)
http://analogdesign.ch

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #8 on: May 14, 2008, 09:47:39 pm »
Depending on how Sparx has captured the state 'stack' for undo operations your solution might be relatively easy of quite difficult. Since I don't know how they've gone about this I really cannot say whether it would be better to lobby for this or give it up in the hope of getting something sooner.

My suggestion: ask Sparx in a feature request, and see what they say, if anything.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #9 on: May 16, 2008, 08:17:14 am »
Quote
Quote
A diagram layout should be undoable.
In the current version the undo menu is indeed enabled after a diagram layout. It can't be undone in one step though. You have to press Ctrl-Z for as many times as EA has chosen it takes steps to layout the diagram. Which can be quite some steps.

...

Anyway though: ONE menu action should be undone with ONE undo action.
I agree, it should be one undo action and if I found anything that behaved differently I would tell a developer to fix it.  But the diagram layout works correctly for me in build 829.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Class Diagram undo/redo for class entries.
« Reply #10 on: May 16, 2008, 04:49:10 pm »
Quote
I agree, it should be one undo action and if I found anything that behaved differently I would tell a developer to fix it.  But the diagram layout works correctly for me in build 829.

Now I'm trying to reproduce it, I see it's actually undone in one step. The reason I thought otherwise is this:

When you call the "Diagram -Layout Diagram" menu and press Ctrl-Z right afterwards, it's allright. When the project browser has the focus however, the "Edit - Undo" menu will still be enabled, but will do nothing.

To reproduce this, just click into the project browser after the diagram layout menu call, and then call the undo menu till your hair turns grey. Click into the diagram again, and undo will work.