Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327756 - canceled commands still mark editor dirty and appear in the command stack
Summary: canceled commands still mark editor dirty and appear in the command stack
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.8.0   Edit
Assignee: Michael Wenz CLA
QA Contact:
URL:
Whiteboard: Indigo M4 M7 theme_bug 0.7.2
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 07:09 EDT by Henrik Rentz-Reichert CLA
Modified: 2011-07-05 09:14 EDT (History)
4 users (show)

See Also:
michael.wenz: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Rentz-Reichert CLA 2010-10-14 07:09:14 EDT
Build Identifier: Build id: 20100917-0705

Custom features which are canceled and thus perform no action should not mark the editor dirty and should not appear in the command stack.
Rather, the method
boolean hasDoneChanges()
should be considered by the framework.

Reproducible: Always

Steps to Reproduce:
1. create a class in the tutorial example
2. save
3. choose Rename but cancel the input dialog
Comment 1 Michael Wenz CLA 2010-10-14 08:16:54 EDT
In this case a CommandContainer is processed in the command 
stack but only for FeatureCommands the check hasDoneChanges is performed. 
Inside the container are again FeatureCommands, so the unpackking of the 
container is missing.
Comment 2 Henrik Rentz-Reichert CLA 2010-10-26 03:28:42 EDT
it seems that also
public boolean hasDoneChanges()
for a AbstractCreateFeature derived feature is not called
Comment 3 Michael Wenz CLA 2010-11-10 04:44:42 EST
This issue is fixed now. hasDoneChanges() is now called for all kinds of features executed on the Graphiti command stack.
Comment 4 Henrik Rentz-Reichert CLA 2011-03-22 01:35:12 EDT
With Graphiti 0.8.0 hasDoneChanges() is still not called in the case of a double click feature.
Comment 5 Henrik Rentz-Reichert CLA 2011-03-22 02:01:41 EDT
See also the proposal in bug 340627.
Comment 6 Michael Wenz CLA 2011-03-22 07:20:50 EDT
ShapeEditPart.performRequest triggered the feature execution in a non-standard way. I have just changed that, so now double click features also can prevent marking the editor dirty.
Comment 7 Michael Wenz CLA 2011-06-16 07:00:31 EDT
Reopened because of an Email request by CPL to downport this fix to the 0.7 codeline.
Comment 8 Michael Wenz CLA 2011-06-24 09:13:07 EDT
Part of Graphiti Indigo 0.8.0
Comment 9 Michael Wenz CLA 2011-06-28 04:00:49 EDT
Reopened for the downport to 0.7
Comment 10 Michael Wenz CLA 2011-06-28 04:01:53 EDT
Prepared changes have been checked-in to 0.7 branch
Comment 11 Michael Wenz CLA 2011-07-05 09:14:06 EDT
Graphiti 0.7.2 build containing the fix is available
Comment 12 Michael Wenz CLA 2011-07-05 09:14:44 EDT
Graphiti service release 0.7.2 is released and availble for download