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

Bug 364035

Summary: DefaultReconnectionFeature#reconnect should use getNewAnchor(context) not context.getNewAnchor()
Product: [Modeling] Graphiti Reporter: Patrick Talbot <ptalbot>
Component: CoreAssignee: Michael Wenz <michael.wenz>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: michael.wenz, ptalbot
Version: 0.8.0Flags: michael.wenz: juno+
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard: Juno M4 Theme_bugs

Description Patrick Talbot CLA 2011-11-17 09:24:53 EST
Build Identifier: 0.8.1.v20110907

Trying to force a connection to use a parent Anchor is currently not possible when the user is reconnecting because 1/ DefaultReconnectionFeature#reconnect is final and 2/ subclassing getNewAnchor(context) doesn't allow to change the new Anchor since reconnect is using context.getNewAnchor directly instead of getNewAnchor(context)

Right now to code the expected behavior, I've had to subclass execute to call a copy method of reconnect...

I believe this is an error in the reconnect code.

Reproducible: Always
Comment 1 Michael Wenz CLA 2011-11-22 08:49:22 EST
What you intent to do would also be possible by overriding preReconnect and setting the new anchor from there; that would require a cast of the context object from the interface to ReconnectionContext.
But, agreed: it's at least asymmetric to call getNewAnchor in canReconnect and to not do it in reconnect.
Comment 2 Michael Wenz CLA 2011-11-22 10:48:28 EST
Fixed in head and pushed to Eclipse
commit a65599940483e7796cede3453475f85f15252ec5
Author: mwenz <michael.wenz@sap.com> 2011-11-22 16:25:02
Committer: mwenz <michael.wenz@sap.com> 2011-11-22 16:41:23
Parent: 8fd315e42ba4e41a911b39af977be8c7a18a9020 (New images for "Providing Reconnection Functionality")
Branches: origin/master, master
Comment 3 Michael Wenz CLA 2012-04-11 10:47:55 EDT
Bookkeeping: Set target release
Comment 4 Michael Wenz CLA 2012-06-29 04:15:27 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)