Permalink
Browse files

[386720] ServerToolTip too aggressive at opening tooltips

  • Loading branch information...
1 parent 3c14acd commit 48579e31e7d96bb695f8b736e3f441b11a9ec612 @elsony elsony committed Aug 20, 2012
@@ -130,8 +130,25 @@ protected Object getToolTipArea(Event event) {
}
protected final boolean shouldCreateToolTip(Event event) {
- if (tree.getItem(new Point(event.x, event.y)) == null)
+ Object o = tree.getItem(new Point(event.x, event.y));
+ if (o == null) {
return false;
+ }
+ IServer server = null;
+ IServerModule module = null;
+ if (o instanceof TreeItem) {
+ Object obj = ((TreeItem)o).getData();
+ if (obj instanceof IServer) {
+ server = (IServer) obj;
+ }
+ if (obj instanceof IServerModule) {
+ module = (IServerModule) obj;
+ }
+ }
+ // Only enable for supported objects.
+ if (server == null && module == null) {
+ return false;
+ }
return super.shouldCreateToolTip(event);
}

0 comments on commit 48579e3

Please sign in to comment.