Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-10-13 15:20:19 -0400
committerKarsten Thoms2017-12-21 03:07:12 -0500
commitda79c20c8a687737fe4a0780faf23d86a37d4b57 (patch)
treedda719912ffbc03dea4f753059c721c9104e5f97
parent615192c39abed12d5fd9699ce80be04b20972519 (diff)
downloadeclipse.platform.debug-da79c20c8a687737fe4a0780faf23d86a37d4b57.tar.gz
eclipse.platform.debug-da79c20c8a687737fe4a0780faf23d86a37d4b57.tar.xz
eclipse.platform.debug-da79c20c8a687737fe4a0780faf23d86a37d4b57.zip
Bug 522103 - Refactor usage of StyledText#getOffsetAtLocation(Point)
Use new method getOffsetAtPoint(Point). Added dependency restriction on org.eclipse.swt. Change-Id: Ic441ba3bf5208f45322c2cb454a0171727789f11 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--org.eclipse.ui.console/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java8
2 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.ui.console/META-INF/MANIFEST.MF b/org.eclipse.ui.console/META-INF/MANIFEST.MF
index a3cd1cbe5..59e3d4362 100644
--- a/org.eclipse.ui.console/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.console/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Export-Package: org.eclipse.ui.console,
org.eclipse.ui.console.actions,
org.eclipse.ui.internal.console;x-internal:=true
Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.swt;bundle-version="[3.107.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
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..e02c88dfc 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
@@ -617,12 +617,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);
+ offset = getTextWidget().getOffsetAtPoint(p);
updateLinks(offset);
}

Back to the top