diff --git a/bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java b/bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java index f35accda33f..a800448578c 100644 --- a/bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java +++ b/bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java @@ -139,6 +139,7 @@ public void start(Rectangle subjectArea) { fDisplay.addFilter(SWT.FocusOut, this); + fDisplay.addFilter(SWT.FocusIn, this); fDisplay.addFilter(SWT.MouseDown, this); fDisplay.addFilter(SWT.MouseUp, this); @@ -270,6 +271,7 @@ else if (event.type == SWT.MouseVerticalWheel && cancelReplacingDelay()) } break; + case SWT.FocusIn: case SWT.MouseUp: case SWT.MouseDown: if (!hasInformationControlReplacer()) @@ -282,7 +284,7 @@ else if (!isReplaceInProgress()) { if (!(iControl5.containsControl(control))) { hideInformationControl(); } else if (cancelReplacingDelay()) { - if (event.type == SWT.MouseUp) { + if (event.type == SWT.MouseUp || event.type == SWT.FocusIn) { stop(); // avoid that someone else replaces the info control before the async is exec'd if (infoControl instanceof IDelayedInputChangeProvider) { final IDelayedInputChangeProvider delayedICP= (IDelayedInputChangeProvider) infoControl; @@ -335,9 +337,11 @@ private void handleMouseMove(Event event) { //transform coordinates to subject control: Point mouseLoc= event.display.map(eventControl, fSubjectControl, event.x, event.y); - if (fSubjectArea.contains(mouseLoc)) + if (fSubjectArea.contains(mouseLoc)) { + System.out.println("returning" + event.type); return; - + } + System.out.println("CONTINUING" + event.type); IInformationControl iControl= getCurrentInformationControl(); if (!hasInformationControlReplacer() || !canMoveIntoInformationControl(iControl)) { if (AbstractHoverInformationControlManager.this instanceof AnnotationBarHoverManager) {