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

Bug 122381

Summary: Request.getExtendedData() is cleared between concurrent invocation of LayoutEditPolicy.showLayoutTargetFeedback
Product: [Tools] GEF Reporter: Robert Kwolek <R.Kwolek>
Component: MiscAssignee: gef-inbox <gef-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Robert Kwolek CLA 2005-12-30 05:58:02 EST
I'm putting an object into the extended data of the request but between concurrent invocations of LayoutEditPolicy.showLayoutTargetFeedback(Request) that object is removed from the extended data despite the request object is the same.

The problem is that in the org.eclipse.gef.tools.ResizeTracker.updateSourceRequest() method
the extended data is cleared.

I'm not sure if it is incorrect behaviour but I have not found any information that extended data could be unconditionally cleared.
Comment 1 Randy Hudson CLA 2005-12-30 09:41:48 EST
The extended data is meant to be used during the handling of one event such as a mouse drag. If it weren't cleared, it would contain meaningless data from some previous event/mouse location.

What are you storing?
Comment 2 Robert Kwolek CLA 2005-12-30 10:32:57 EST
I'm storing (or I was storing, see next sentence) a figure which shall be displayed during moving an edit part. In such case there is a workaround (or rather correct implementation ;-)): I can use LayoutEditPolicy.createChildEditPolicy.
Another example: I'm using the extended data to store a source connection anchor which shall be modified during creation of a connection basing on the selected target edit part. And in this case the extended data is not cleared.

For me the extended data was a kind of "request persistent storage" but in fact there is no guarantee that some internal GEF module will not remove my data. So, maybe there should be a comment, that the extended data is not meant to be used "externally" (outside GEF), or maybe the places where it is cleared could be specified?...