Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364035 - DefaultReconnectionFeature#reconnect should use getNewAnchor(context) not context.getNewAnchor()
Summary: DefaultReconnectionFeature#reconnect should use getNewAnchor(context) not con...
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.0   Edit
Assignee: Michael Wenz CLA
QA Contact:
URL:
Whiteboard: Juno M4 Theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 09:24 EST by Patrick Talbot CLA
Modified: 2012-06-29 04:15 EDT (History)
2 users (show)

See Also:
michael.wenz: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)