Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2018-01-04 03:54:58 -0500
committerKarsten Thoms2018-01-04 03:54:58 -0500
commit40fef335d8d498da87bcfa0f1898d1b62428c0ce (patch)
tree492f7e58b7b21d78e11a41dcdb9487c89366befc
parent5d8385eab6b9e5786a860957d68e5b40258dc494 (diff)
downloadeclipse.platform.debug-40fef335d8d498da87bcfa0f1898d1b62428c0ce.tar.gz
eclipse.platform.debug-40fef335d8d498da87bcfa0f1898d1b62428c0ce.tar.xz
eclipse.platform.debug-40fef335d8d498da87bcfa0f1898d1b62428c0ce.zip
Bug 522103 - Refactor usage of StyledText#getOffsetAtLocation(Point)I20180104-2000
Change-Id: Id0c6516e9619a2fda1ca233937d9db7dda81b5f4 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
index 0b28a96e1..fdfffe1c2 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
@@ -616,13 +616,8 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
*/
@Override
public void mouseMove(MouseEvent e) {
- int offset = -1;
- try {
- Point p = new Point(e.x, e.y);
- offset = getTextWidget().getOffsetAtLocation(p);
- } catch (IllegalArgumentException ex) {
- // out of the document range
- }
+ Point p = new Point(e.x, e.y);
+ int offset = getTextWidget().getOffsetAtPoint(p);
updateLinks(offset);
}

Back to the top