Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2017-12-21 03:51:42 -0500
committerSarika Sinha2017-12-21 03:51:42 -0500
commitcfe9dc2550cde15a5749582c1f069ad27ee8822a (patch)
treedff8063ff3014766f8084a479ed208758aea6ab6
parentda79c20c8a687737fe4a0780faf23d86a37d4b57 (diff)
downloadeclipse.platform.debug-I20171224-2000.tar.gz
eclipse.platform.debug-I20171224-2000.tar.xz
eclipse.platform.debug-I20171224-2000.zip
Revert "Bug 522103 - Refactor usage of StyledText#getOffsetAtLocation(Point)"I20171226-2000I20171225-2000I20171224-2000I20171223-1500I20171222-2000I20171221-2000
-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, 6 insertions, 3 deletions
diff --git a/org.eclipse.ui.console/META-INF/MANIFEST.MF b/org.eclipse.ui.console/META-INF/MANIFEST.MF
index 59e3d4362..a3cd1cbe5 100644
--- a/org.eclipse.ui.console/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.console/META-INF/MANIFEST.MF
@@ -10,7 +10,6 @@ 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 e02c88dfc..0b28a96e1 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,8 +617,12 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
@Override
public void mouseMove(MouseEvent e) {
int offset = -1;
- Point p = new Point(e.x, e.y);
- offset = getTextWidget().getOffsetAtPoint(p);
+ try {
+ Point p = new Point(e.x, e.y);
+ offset = getTextWidget().getOffsetAtLocation(p);
+ } catch (IllegalArgumentException ex) {
+ // out of the document range
+ }
updateLinks(offset);
}

Back to the top