Custom Connection Anchors [message #556675] |
Thu, 02 September 2010 09:55 |
masija . Messages: 59 Registered: July 2010 |
Member |
|
|
Hi @ all,
does anybody know, how to implement the standard behavior of gmf-editors
in a way, that connections no longer "snap" to the rectangular container
of a node?
I tried to implement the two methods
getTargetConnectionAnchor(ConnectionEditPart arg0) and get
SourceConnectionAnchor(ConnectionEditPart arg0) plus the two methods for
the requests.
In these methods I returned an EllipseAnchor instead of the standard
chopbox Anchor...
These were the steps, I found here in the gmf-forums, but unfortunately
these methods are never called (the request methods are called).
Also, if I add the @Override tags to the methods, an message appears to
remove the tags ("The method
getTargetConnectionAnchor(ConnectionEditPart) of type CircleEditPart
must override or implement a supertype method")
If anybody knows how to change this behavior, please let me know ;)
Thanks a lot,
Masija
|
|
|
Re: Custom Connection Anchors [message #556742 is a reply to message #556675] |
Thu, 02 September 2010 13:53 |
Christophe Bouhier Messages: 937 Registered: July 2009 |
Senior Member |
|
|
On 02-09-10 11:55, Masija wrote:
> Hi @ all,
> does anybody know, how to implement the standard behavior of gmf-editors
> in a way, that connections no longer "snap" to the rectangular container
> of a node?
This use case is actually described in the GMF book. (Yes there is one,
but it's in disguise!)
http://www.eclipse.org/resources/resource.php?id=493
(Page 94)
I have done it myself, but what it describes is overriding indeed those
two methods getSource/TargetConnectionAnchor(..) in your xxxEditPart.
rgds, Christophe
>
> I tried to implement the two methods
> getTargetConnectionAnchor(ConnectionEditPart arg0) and get
> SourceConnectionAnchor(ConnectionEditPart arg0) plus the two methods for
> the requests.
> In these methods I returned an EllipseAnchor instead of the standard
> chopbox Anchor...
> These were the steps, I found here in the gmf-forums, but unfortunately
> these methods are never called (the request methods are called).
>
> Also, if I add the @Override tags to the methods, an message appears to
> remove the tags ("The method
> getTargetConnectionAnchor(ConnectionEditPart) of type CircleEditPart
> must override or implement a supertype method")
>
> If anybody knows how to change this behavior, please let me know ;)
> Thanks a lot,
>
> Masija
|
|
|
|
Powered by
FUDForum. Page generated in 0.02840 seconds