Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-02-23 10:24:47 +0000
committerDani Megert2012-02-23 10:24:47 +0000
commitdb449c047ea409b35e73b1cf7094d38610826800 (patch)
tree8cbde95bef76ffcbd8cc9d393ba87b12f2e13972
parent6c3a7b4301f75433ebbd03ae094935aa066f48ed (diff)
downloadeclipse.platform.text-db449c047ea409b35e73b1cf7094d38610826800.tar.gz
eclipse.platform.text-db449c047ea409b35e73b1cf7094d38610826800.tar.xz
eclipse.platform.text-db449c047ea409b35e73b1cf7094d38610826800.zip
Partially fixed bug 372297: Aggressive folding hover clipping in
AnnotationBarHoverManager
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
index cdf1e0631ae..5593ba01dd1 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -565,11 +565,12 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
* Returns the number of the currently visible lines.
*
* @return the number of the currently visible lines
- * @deprecated to avoid deprecation warning
*/
private int computeNumberOfVisibleLines() {
- // Hack to reduce amount of copied code.
- return LineNumberRulerColumn.getVisibleLinesInViewport(fSourceViewer.getTextWidget());
+ StyledText textWidget= fSourceViewer.getTextWidget();
+ int lineHeight= textWidget.getLineHeight();
+ int clientAreaHeight= textWidget.getClientArea().height;
+ return clientAreaHeight / lineHeight;
}
/**

Back to the top