Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » ReconnectionContext(Reconnect Source/Target Progamatically)
ReconnectionContext [message #972374] Mon, 05 November 2012 15:25 Go to next message
Surya Kathayat is currently offline Surya KathayatFriend
Messages: 44
Registered: July 2012
Member
Hi,

I am trying to reconnect a source of a Link programatically.

Fourth paramater in the ReconncetionContext constructor is "targetLocation". What does that represents?
Can "targetLocation" be determined from newAnchor, is yes how?
Otherwise how "ILocation" can be created/instiated?


Regards
Surya



                ReconnectionContext reConContext = new ReconnectionContext(conn, oldAnchor, newAnchor, [b]??targetLocation??[/b]);
		reConContext.setReconnectType(ReconnectionContext.RECONNECT_SOURCE);
		IReconnectionFeature reConFeature = getFeatureProvider().getReconnectionFeature(reConContext);
		if(reConFeature.canReconnect(reConContext)){
			reConFeature.reconnect(reConContext);
			oldSource.getOutgoingLinks().remove(link);
			newSource.getOutgoingLinks().add(link);
		}

[Updated on: Mon, 05 November 2012 15:26]

Report message to a moderator

Re: ReconnectionContext [message #981576 is a reply to message #972374] Mon, 12 November 2012 14:26 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Surya,

it simply represents an x/y coordinate where to reconnect to and it is
optional. You might get the needed value from the anchor or any other shape
by evaluating its x/y coodinates.

Michael
Previous Topic:Undo
Next Topic:Getting exceptions on upgrading Graphiti from 0.8.2 version to Graphiti 0.9.1
Goto Forum:
  


Current Time: Fri Apr 26 00:42:30 GMT 2024

Powered by FUDForum. Page generated in 0.04706 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top