Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313229 - Deletion of .di file deletes .uml as well
Summary: Deletion of .di file deletes .uml as well
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Tristan Faure CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 315360 (view as bug list)
Depends on:
Blocks: 402036
  Show dependency tree
 
Reported: 2010-05-17 15:43 EDT by Ansgar Radermacher CLA
Modified: 2013-03-08 06:04 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ansgar Radermacher CLA 2010-05-17 15:43:57 EDT
Build Identifier: Build id: 20100506-2000

When a .di file is deleted, the associated .uml file is deleted as well. Whereas this might be considered as a feature, it is a dangereous choice as the .di file is "only a graphical" representation which the user might want to delete independently from the model itself. Behavior should perhaps be configurable

Reproducible: Always
Comment 1 Yann Tanguy CLA 2010-07-01 15:28:06 EDT
Not a bug, its the expected behavior (I turn this into enhancement request).
Comment 2 Ansgar Radermacher CLA 2010-07-02 04:00:28 EDT
(In reply to comment #1)
> Not a bug, its the expected behavior (I turn this into enhancement request).

I disagree. The worst thing a tool can do is to accidently destroy your data. The minimum is to show a explicitly and BIG what the action is going to do since this is not the standard behavior of a tool.
Comment 3 Thibault Landré CLA 2010-07-02 05:47:21 EDT
In fact using the preview button of the deletion dialog allows you to uncheck the associated model file. 
Like Yann says, it is the expected behavior.

But I agree that the user should be aware of what he is really destroying and the preview button is not enough.

Still an enhancement though.
Comment 4 Ansgar Radermacher CLA 2010-07-02 06:14:59 EDT
(In reply to comment #3)
> In fact using the preview button of the deletion dialog allows you to uncheck
> the associated model file. 
> Like Yann says, it is the expected behavior.
> 
> But I agree that the user should be aware of what he is really destroying and
> the preview button is not enough.
> 
> Still an enhancement though.

I agree that the preview is a good solution, but it should be openend by default. In addition (or alternatively, if it's non-trivial to open the preview by default), the dialog should have a text like "Attention: additional files will be deleted! Consult preview for details.".

I think (hope), the additional text is easy to add and we can close the bug.
Comment 5 Ansgar Radermacher CLA 2012-07-17 10:38:06 EDT
This is a quite old bug... yet, I think it is quite important to avoid that people accidently delete their models.

The "Papyrus model deletion" should only occur, if the user invokes the delete command on a Papyrus resource itself, i.e. on an element in the project explorer that encapsulates the.uml/.notation/.di as children, not if the user selects one of the three files within the resource.

The model deletion should also not occur, if the delete command has been issued from a view that does not show the files in a hierarchical way, e.g. the PackageExplorer. In this case, the user does "see" that there is a kind of hierarchy and thus does not expect that the delete operation does something in addition to deleting the current file.
Comment 6 Camille Letavernier CLA 2013-02-28 13:32:30 EST
Fixed in r10302
Comment 7 Camille Letavernier CLA 2013-03-08 06:04:46 EST
*** Bug 315360 has been marked as a duplicate of this bug. ***