Author Topic: Safer Ctrl-Delete  (Read 2433 times)

jamessher

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Safer Ctrl-Delete
« on: July 15, 2008, 05:49:09 pm »
Hi,
I am planning to submit a feature request but wanted to get some opinions first. I think it would be very helpful to have more protection against deletion from the model using Ctrl-Delete. This is needed because Ctrl-Delete has now become second nature to me and other modellers and the chances of inadvertent deletion is still high.

I recently navigated to a sequence diagram which hadn't been looked at for some time and saw that one of the elements (component instance) had no name or parent classifier. The classifier had been deleted some time in the past. I could figure out from the context what it was but this wouldn't always be the case.

So in order to highlight the danger of deleting an element which is being used in the model (in diagrams, links, instances, etc) I would suggest that a more verbose (or additional) delete dialog appear which warns that the element is used in the model. If the element is not used  (in no diagrams, no links to other elements, no instances in diagrams, etc) then the delete can proceed as normal.

Any opinions or additional thoughts/ideas ?

Thanks
   James

Transition Technologies

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Safer Ctrl-Delete
« Reply #1 on: July 15, 2008, 06:24:55 pm »
Hi James,
As far as I know there is already a dialog box (Delete selected items from the model and all diagrams? WARNING: This action cannot be undone)
In my opinion that is enough.
« Last Edit: July 15, 2008, 06:28:18 pm by transition »
Regards,
Transition Technologies
Authorized Reseller and Training Partner of Sparx Systems
www.ea.tt.com.pl

jamessher

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Safer Ctrl-Delete
« Reply #2 on: July 15, 2008, 09:07:55 pm »
Hi,

Unfortunately I don't think that dialog is enough. I know that I and others have become non-chalant about using Ctrl-Delete/Enter. Ideally users would check the likely impact of deleting an element (find in diagrams, look at links, etc) before doing it but I know I can't enforce this.

As far as I can see the current dialog comes up even if the element is used nowehere or has no links. Alternatively if a bigger dialog would appear which would show something like the combination of the 'find in diagrams' and the 'links tab'. This should get peoples attention when they see how the element is used throughout the model.

Another idea would be to have a 'delete trigger' mechanism something like database have which would allow us to do more add-in code to display an additional warning dialog.

Or perhaps I am the only person who finds the current generic warning dialog to be sufficient.

Cheers
    James

marcel_str

  • EA User
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Re: Safer Ctrl-Delete
« Reply #3 on: July 15, 2008, 09:58:17 pm »
More information could help you in some cases to distinguish the difference between a dangling element or a connected one. Though I don't beleive it will help if you are allready used to clicking ctrl+del+enter too quickly after each other. You still have to wait before you press enter, no matter how much information there is in the warning box.

For these cases, I think it's more usefull to make a personal rule.

Who ruins the design in this way, will buy cakes for the rest of the staff.
« Last Edit: July 15, 2008, 10:00:34 pm by marcelstr »

Transition Technologies

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Safer Ctrl-Delete
« Reply #4 on: July 15, 2008, 11:21:40 pm »
Yea I agree with Marcel, The shortcut is Ctrl+Delete, NOT Ctrl+Delete+Enter  ;)
Regards,
Transition Technologies
Authorized Reseller and Training Partner of Sparx Systems
www.ea.tt.com.pl

jamessher

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Safer Ctrl-Delete
« Reply #5 on: July 15, 2008, 11:32:09 pm »
"Who ruins the design in this way, will buy cakes for the rest of the staff."
But in many cases we have no idea who 'ruins the design' since. It may have been done by a novice weeks ago. We could have 30 or 40 engineers who can do damage.

What about the trigger idea ? ie. like a database trigger onto which we can hook user-defined logic. Does anyone know if the add-in facility for example allow us to 'catch' deletions and display our own extra warning dialogs ?
    James

Luis J. Lobo

  • EA User
  • **
  • Posts: 250
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: Safer Ctrl-Delete
« Reply #6 on: July 15, 2008, 11:37:51 pm »
Via add-in it's possible to define your own rules.

The following broadcast events are available to do this: OnPreDeleteConnector(), OnPreDeletePackage(), OnPreDeleteElement() and OnPreDeleteDiagram()...

jamessher

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Safer Ctrl-Delete
« Reply #7 on: July 16, 2008, 12:11:04 am »
Cool Luis, maybe this is the way forward.