Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347421

Summary: DefaultDeleteFeature.setDoneChanges(setDoneChanges) should be protected
Product: [Modeling] Graphiti Reporter: Veit Hoffmann <vhoff>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: felix.velasco, karsten.thoms, michael.wenz
Version: 0.8.0Flags: michael.wenz: juno+
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard: Juno M4 Theme_round_offs

Description Veit Hoffmann CLA 2011-05-27 05:16:18 EDT
Build Identifier: 0.8.0.v20110520-0834

This method should be protected to enable calling it from implementing subclasses. Else its impossible to set the editor dirty if the execute-methode is overwritten in a subclass without calling super.execute(...).

Reproducible: Always
Comment 1 Michael Wenz CLA 2011-05-27 05:31:03 EDT
Post Indigo enhancement
Comment 2 Michael Wenz CLA 2011-07-19 04:09:35 EDT
Would like to target for Juno
Comment 3 Felix Velasco CLA 2011-11-10 05:25:37 EST
Veit, have you tried overriding hasDoneChanges() instead?

It should cover your needs without any code change.
Comment 4 Michael Wenz CLA 2011-11-10 07:50:32 EST
(In reply to comment #3)
> Veit, have you tried overriding hasDoneChanges() instead?
> 
> It should cover your needs without any code change.

Yes, but this would rather be a workaround. The much cleaner way would be to simply set the flag by a call to setDoneChanges from a subclass
Comment 5 Michael Wenz CLA 2011-11-10 09:10:56 EST
I have made the method protected and fixed the bug that it was called by the delete method too early. Besides I have have improved some related JavaDoc.

Checked-in to head and pushed to eclipse:
commit d4c7d106d5d8c893fd9209c8fe0bd0c9ff5a24b2
Author: mwenz <michael.wenz@sap.com> 2011-11-10 14:57:11
Committer: mwenz <michael.wenz@sap.com> 2011-11-10 14:57:11
Parent: 2d6f1a943d3c0373855bc148a3f1a8af28e305c9 (Bug 361932: Set compiler settings to Java 1.5, enforce JDK 1.5 installed and removed override tags for interface method implementations to make Graphiti truly Java 1.5 compatible)
Child: 857c60509a4d519bdd715022e39f0bdea3aa0de6 (Hide some irrelevant html and xml warnings)
Branches: origin/master, master
Comment 6 Michael Wenz CLA 2011-11-21 08:50:20 EST
*** Bug 364311 has been marked as a duplicate of this bug. ***
Comment 7 Michael Wenz CLA 2012-04-11 10:43:59 EDT
Bookkeeping: Set target release
Comment 8 Michael Wenz CLA 2012-06-29 04:13:00 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)