Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorazerr2018-05-03 16:21:38 +0000
committerazerr2018-05-03 16:27:31 +0000
commitc46fb77d882d80965ea28120c4fab547312e1080 (patch)
treef893f65b756eb183654a944ecd9f5ec47f1ca2f2 /org.eclipse.jface.text/src/org/eclipse/jface/text
parent0c57e7f34e4233e11b0cb3644bd7677236e28313 (diff)
downloadeclipse.platform.text-c46fb77d882d80965ea28120c4fab547312e1080.tar.gz
eclipse.platform.text-c46fb77d882d80965ea28120c4fab547312e1080.tar.xz
eclipse.platform.text-c46fb77d882d80965ea28120c4fab547312e1080.zip
Bug 534328 - [code mining] Avoid delay to click on inlined annotation
Change-Id: I73927a6593effb919910c144f274109c7f474be2 Change-Id: I6666dc7da2aa9fa79f1554ba58dff14114469a9d Signed-off-by: azerr <angelo.zerr@gmail.com>
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java31
1 files changed, 2 insertions, 29 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
index d99d14df60d..f5c43be3873 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
@@ -26,7 +26,6 @@ import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.events.MouseTrackListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Font;
@@ -232,7 +231,7 @@ public class InlinedAnnotationSupport {
}
}
- private class MouseTracker implements MouseTrackListener, MouseMoveListener, MouseListener {
+ private class MouseTracker implements MouseMoveListener, MouseListener {
private AbstractInlinedAnnotation fAnnotation;
@@ -252,7 +251,7 @@ public class InlinedAnnotationSupport {
}
@Override
- public void mouseHover(MouseEvent e) {
+ public void mouseMove(MouseEvent e) {
AbstractInlinedAnnotation oldAnnotation= fAnnotation;
update(e);
if (oldAnnotation != null) {
@@ -269,19 +268,6 @@ public class InlinedAnnotationSupport {
}
@Override
- public void mouseMove(MouseEvent e) {
- if (fAnnotation != null) {
- AbstractInlinedAnnotation oldAnnotation= fAnnotation;
- update(e);
- if (!oldAnnotation.equals(fAnnotation)) {
- oldAnnotation.onMouseOut(e);
- fAnnotation= null;
- fAction= null;
- }
- }
- }
-
- @Override
public void mouseDoubleClick(MouseEvent e) {
// Do nothing
}
@@ -300,17 +286,6 @@ public class InlinedAnnotationSupport {
fAction.accept(e);
}
}
-
- @Override
- public void mouseEnter(MouseEvent e) {
- // Do nothing
- }
-
- @Override
- public void mouseExit(MouseEvent e) {
- // Do nothing
- }
-
}
/**
@@ -356,7 +331,6 @@ public class InlinedAnnotationSupport {
visibleLines= new VisibleLines();
fViewer.addViewportListener(visibleLines);
text.addMouseListener(fMouseTracker);
- text.addMouseTrackListener(fMouseTracker);
text.addMouseMoveListener(fMouseTracker);
setColor(text.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
}
@@ -385,7 +359,6 @@ public class InlinedAnnotationSupport {
StyledText text= this.fViewer.getTextWidget();
if (text != null && !text.isDisposed()) {
text.removeMouseListener(this.fMouseTracker);
- text.removeMouseTrackListener(this.fMouseTracker);
text.removeMouseMoveListener(this.fMouseTracker);
}
if (fViewer != null) {

Back to the top