Highlighting of Anchors [message #1334680] |
Mon, 05 May 2014 14:01  |
Eclipse User |
|
|
|
I'm migrating/merging to the current Graphiti HEAD from an custom branch originally I forked about two years ago. Almost all is going quite smoothly, except for highlit of anchors during connection creation.
Some related issues
https://bugs.eclipse.org/bugs/show_bug.cgi?id=363186
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329517
I'm still struggling to understand how it's supposed to (currently) work. I understand that
XToolBehaviorProvider.getSelectionInfoForAnchor() is supposed to be called when hovering... but it doesn't.
Specifically, I get the tutorial code and its TutorialToolBehaviorProvider
(overriding the getSelectionInfoFor* to log the callings) and I get that only
getSelectionInfoForShape() is called, not getSelectionInfoForAnchor or
getSelectionInfoForConnection
My questions then, for now, are:
- When are those functions supposed to be called? (their docs don't say more that then method names) - and their names suggest they are called when the shape is selected ("selection info"), but they are also called for hovering?
- It's ok that in the tutorial they don't get called?
- Is there some example that show how to highlit anchors on connection creation (source or target)?
If this helps: I see that in my old working code, the highlit-on-hovering was triggered by GFAbstractShape.adaptBackgroundToHover(), but now (in the tutorial) when I hover with the Connection (EReference) over the anchor (and the connection tool pointer changes to "enabled") the method is only called with the value getHoverFeedback() = IVisualState.HOVER_OFF - and hence nothing happens. I'm not sure if this is correct behaviour.
[Updated on: Mon, 05 May 2014 14:56] by Moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04375 seconds