Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356090 - Patterns - DeleteFeature hasDone problem
Summary: Patterns - DeleteFeature hasDone problem
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Juno M2 Theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 10:52 EDT by Volker Wegert CLA
Modified: 2012-06-28 10:40 EDT (History)
2 users (show)

See Also:
michael.wenz: juno+


Attachments
screenshot of debugger (126.75 KB, image/png)
2011-08-29 10:52 EDT, Volker Wegert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Wegert CLA 2011-08-29 10:52:12 EDT
Build Identifier: 20110301-1815 / 0.9.0.v20110818-1338

The pattern implementations use the class DeleteFeatureForPattern that extends DefaultDeleteFeature and therefore contain its own property doneChanges. Following the attribute chain delegate --> pattern --> wrappedDeleteFeature, there's a different instance of DefaultDeleteFeature that handles the actual object deletion and sets its own attribute doneChanges to true. The command stack performs a check to see whether any changes were made, and as far as I can see, it only checks the "outer" DeleteFeatureForPattern instance. The doneChanges attribute of this class is never set to true, so the entire undo stack is reverted. I'll attach a screenshot to illustrate the problem. 

Reproducible: Always
Comment 1 Volker Wegert CLA 2011-08-29 10:52:41 EDT
Created attachment 202330 [details]
screenshot of debugger
Comment 2 Michael Wenz CLA 2011-08-29 10:56:39 EDT
After enabling delete in our SDDT sample this id reproducable
Comment 3 Matthias Gorning CLA 2011-09-09 09:34:58 EDT
Fixed. The "outer" feature delegates the call hasDonechanges() to the "inner" feature/pattern.
Comment 4 Michael Wenz CLA 2012-04-11 10:33:04 EDT
Bookkeeping: Set target release
Comment 5 Michael Wenz CLA 2012-06-28 10:40:53 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)