Skip to content

Commit 6614fa6

Browse files
committed
Replace AbstractHoverInformationControl on FocusIn
With this commit, the hover information control can be replaced on the focus in event. contributes to eclipse-platform/eclipse.platform.swt#1540
1 parent d6a50a4 commit 6614fa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public void start(Rectangle subjectArea) {
139139

140140
fDisplay.addFilter(SWT.FocusOut, this);
141141

142+
fDisplay.addFilter(SWT.FocusIn, this);
142143
fDisplay.addFilter(SWT.MouseDown, this);
143144
fDisplay.addFilter(SWT.MouseUp, this);
144145

@@ -270,6 +271,7 @@ else if (event.type == SWT.MouseVerticalWheel && cancelReplacingDelay())
270271
}
271272
break;
272273

274+
case SWT.FocusIn:
273275
case SWT.MouseUp:
274276
case SWT.MouseDown:
275277
if (!hasInformationControlReplacer())
@@ -282,7 +284,7 @@ else if (!isReplaceInProgress()) {
282284
if (!(iControl5.containsControl(control))) {
283285
hideInformationControl();
284286
} else if (cancelReplacingDelay()) {
285-
if (event.type == SWT.MouseUp) {
287+
if (event.type == SWT.MouseUp || event.type == SWT.FocusIn) {
286288
stop(); // avoid that someone else replaces the info control before the async is exec'd
287289
if (infoControl instanceof IDelayedInputChangeProvider) {
288290
final IDelayedInputChangeProvider delayedICP= (IDelayedInputChangeProvider) infoControl;

0 commit comments

Comments
 (0)