Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[386720] ServerToolTip too aggressive at opening tooltips

  • Loading branch information...
commit 48579e31e7d96bb695f8b736e3f441b11a9ec612 1 parent 3c14acd
Elson Yuen elsony authored
19 plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerToolTip.java
View
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.