Community
Participate
Working Groups
In order to support some hover functionality over the nodes and connections I need to know the GraphItem under the mouse. It seems that exposing the 'GraphItem getGraphItem(IFigure figure)' as public will allow me to do so efficiently.
I assume what you need is more than a popup when hovering over nodes or connections? These could be set with GraphNode#setTooltip and GraphConnection#setTooltip. Or would something using 'ZestStyles.NODES_HIDE_TEXT | ZestStyles.NODES_FISHEYE' be useful for you (see http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/swt/GraphSnippet6.java)? If these don't work for you, could you provide a little snippet of what exactly you would like to do? I'm just trying to see if there is a different solution to your issue, since any public API we release cannot be changed or removed easily later, so we try to expose as little as possible.
Hello guys. So I'm having almost the same problem with grabbing a graph item. My method, called getItem, receives a DropTargetEvent, and does the following: 1. Gets and IFigure with graph.getFigureAt(event.x, event.y) 2. Uses reflection to get a GraphItem using graph.getGraphItem(IFigure) All in all, what I want to do is get a GraphItem knowing its position on the graph. Can anyone suggest me a more 'clean' alternative to what I've done?