Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorazerr2018-05-03 08:53:28 -0400
committerazerr2018-05-03 08:53:28 -0400
commitdb8a856dcb8e363ce2ebe4c068189743d90c2533 (patch)
treeb2ba7d1ac10370c3ed55dc3dc0c4f39db42f0913 /org.eclipse.jface.text/src
parent8200abf1ca09e6ff53f99517e3141ebdb26e5557 (diff)
downloadeclipse.platform.text-db8a856dcb8e363ce2ebe4c068189743d90c2533.tar.gz
eclipse.platform.text-db8a856dcb8e363ce2ebe4c068189743d90c2533.tar.xz
eclipse.platform.text-db8a856dcb8e363ce2ebe4c068189743d90c2533.zip
Bug 534314 - [code mining] Line numbering and collapse/expand aligned
with code lines Change-Id: Ic8d18a00328dda9cb9970447bb3f38377fcf9cb6 Signed-off-by: azerr <angelo.zerr@gmail.com>
Diffstat (limited to 'org.eclipse.jface.text/src')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
index 132f249eb..8c6808893 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
@@ -821,7 +821,14 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul
r.height= textBounds.height;
r.y = textBounds.y;
}
-
+ // adjust the annotation position at the bottom of the line if line height has custom line height
+ int defaultLineHeight= fCachedTextWidget.getLineHeight();
+ int lineHeight= fCachedTextWidget.getLineHeight(offset);
+ if (lineHeight > defaultLineHeight) {
+ int adjust= lineHeight - defaultLineHeight;
+ r.y+= adjust;
+ r.height-= adjust;
+ }
if (r.y < dimension.y && fAnnotationAccessExtension != null) // annotation within visible area
fAnnotationAccessExtension.paint(annotation, gc, fCanvas, r);
}

Back to the top