Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Patterns - DeleteFeature hasDone problem
Patterns - DeleteFeature hasDone problem [message #719913] Mon, 29 August 2011 08:45 Go to next message
Volker Wegert is currently offline Volker Wegert
Messages: 169
Registered: July 2009
Senior Member
Hello,

I've got a problem with the deletion of diagram elements using patterns. I'm using Graphiti 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.

index.php/fa/3798/0/

I'm not entirely sure, but I think I've found a bug - could anyone confirm this?

Thanks
Volker
Re: Patterns - DeleteFeature hasDone problem [message #719937 is a reply to message #719913] Mon, 29 August 2011 10:13 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1587
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Yes you're right. This is a bug. Would you please open a Bugzilla for this?

Thanks,
Michael


"Volker Wegert" schrieb im Newsbeitrag
news:j3g0vm$q71$1@news.eclipse.org...

Hello,

I've got a problem with the deletion of diagram elements using patterns. I'm
using Graphiti 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.



I'm not entirely sure, but I think I've found a bug - could anyone confirm
this?

Thanks
Volker
Re: Patterns - DeleteFeature hasDone problem [message #719955 is a reply to message #719937] Mon, 29 August 2011 10:53 Go to previous message
Volker Wegert is currently offline Volker Wegert
Messages: 169
Registered: July 2009
Senior Member
Done, https://bugs.eclipse.org/bugs/show_bug.cgi?id=356090
Previous Topic:Capture zone of anchors, setReferencedGraphicsAlgorithm
Next Topic:Connections
Goto Forum:
  


Current Time: Wed Aug 27 17:27:03 EDT 2014

Powered by FUDForum. Page generated in 0.02427 seconds