import org.eclipse.swt.widgets.Event;\r
import org.eclipse.swt.widgets.Listener;\r
import org.eclipse.swt.widgets.ScrollBar;\r
+import org.eclipse.swt.widgets.Shell;\r
import org.eclipse.swt.widgets.Text;\r
import org.eclipse.swt.widgets.Tree;\r
import org.eclipse.swt.widgets.TreeColumn;\r
deactivateEditingContext();\r
}\r
});\r
- editor.setEditor(control, item, columnIndex);\r
+ \r
+ if (!(control instanceof Shell)) {\r
+ editor.setEditor(control, item, columnIndex);\r
+ }\r
+ \r
\r
control.setFocus();\r
\r
\r
setBasicListeners();\r
setDefaultProcessors();\r
+ \r
+ this.toolTip = new GraphExplorerToolTip(explorerContext, tree);\r
}\r
\r
@Override\r
TreeItem previousSingleSelection = null;\r
long focusGainedAt = Long.MIN_VALUE;\r
\r
+ protected GraphExplorerToolTip toolTip;\r
+\r
protected void setBasicListeners() {\r
// Keep track of the previous single selection to help\r
// decide whether to start editing a tree node on mouse\r
GENodeQueryManager manager = new GENodeQueryManager(newContext, null, null, TreeItemReference.create(null));\r
this.explorerContext = newContext;\r
oldContext.safeDispose();\r
+ toolTip.setGraphExplorerContext(explorerContext);\r
\r
// Need to empty these or otherwise they won't be emptied until the\r
// explorer is disposed which would mean that many unwanted references\r
this.focusService = (IFocusService) serviceLocator.getService(IFocusService.class);\r
}\r
}\r
+ \r
+ @Override\r
+ public Object getClicked(Object event) {\r
+ MouseEvent e = (MouseEvent)event;\r
+ final Tree tree = (Tree) e.getSource();\r
+ Point point = new Point(e.x, e.y);\r
+ TreeItem item = tree.getItem(point);\r
+\r
+ // No selectable item at point?\r
+ if (item == null)\r
+ return null;\r
+\r
+ Object data = item.getData();\r
+ return data;\r
+ }\r
\r
}\r