Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342207 - Deleting an actor should delete the diagram files too
Summary: Deleting an actor should delete the diagram files too
Status: CLOSED WONTFIX
Alias: None
Product: eTrice
Classification: Modeling
Component: UserInterface (show other bugs)
Version: 0.1.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: 0.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 14:36 EDT by Thomas Jung CLA
Modified: 2011-08-04 01:56 EDT (History)
1 user (show)

See Also:
hrr: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Jung CLA 2011-04-07 14:36:18 EDT
If you delete an actor either in the .room file or in the diagram, the appropriate diagram files should be deleted too. Recreate an actor with the same name will cause "red" actors in the diagram.
All references of this actor (and the appropriate diagram files) should be deleted and/or updated.
Comment 1 Henrik Rentz-Reichert CLA 2011-04-08 04:21:18 EDT
The enhancement request is definitely valid.

It is not possible though triggering this clean-up automatically when the actor class is removed from the .room file (deleting it from the diagram is not possible anyways).
Xtext updates its abstract syntax tree and won't even note that an actor class is gone.

So I would propose to add a command to the eTrice menu "Clean-up Diagrams..." which opens a dialog that lets the user choose between
- current folder
- enclosing project
- workspace

The dialog should save open editors (after user feedback) and check whether diagrams reference non-existing actor classes.

If desired a list of all obsolete diagrams could be presented and the user should check which should be deleted.
Comment 2 Henrik Rentz-Reichert CLA 2011-05-09 05:33:11 EDT
This is in general not possible.
First Xtext is plain text. All objects are of a more transient nature. It can not be determined when an actor is deleted.
Second eTrice explicitly supports distributed models. It is not possible to determine all references. We have to rely on fixing the problem when e.g. a diagram is opened.