Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangelozerr2018-03-23 10:15:40 -0400
committerMickael Istria2018-03-23 11:37:59 -0400
commita66504b047df85a45ad5680be34b2edbe430b39f (patch)
tree6fc952c0b8eb6df70cb1e84bdd8e9b52026a2cfd /org.eclipse.jface.text/src
parent910772ae20594fbad8efe137df01c165c669fbc4 (diff)
downloadeclipse.platform.text-a66504b047df85a45ad5680be34b2edbe430b39f.tar.gz
eclipse.platform.text-a66504b047df85a45ad5680be34b2edbe430b39f.tar.xz
eclipse.platform.text-a66504b047df85a45ad5680be34b2edbe430b39f.zip
Bug 532829 - [CodeMining] Eclipse IDE freezes when refactor is done forI20180324-1500I20180323-2000
method parameter name Change-Id: I335ebf9ece550afb083fe63b4deb895963c8f877 Signed-off-by: angelozerr <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/inlined/InlinedAnnotationDrawingStrategy.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
index adaa340de..ff290e978 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java
@@ -186,8 +186,12 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy {
if (metrics.ascent == fullHeight) {
return null;
}
- metrics.width= width;
- metrics.ascent= fullHeight;
+ /**
+ * We must create a new GlyphMetrics instance because comparison with similarTo used
+ * later in StyledText#setStyleRange will compare the same (modified) and won't
+ * realize an update happened.
+ */
+ metrics= new GlyphMetrics(fullHeight, 0, width);
}
} else {
metrics= null;
@@ -309,7 +313,12 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy {
if (metrics.width == fullWidth) {
return null;
}
- metrics.width= fullWidth;
+ /**
+ * We must create a new GlyphMetrics instance because comparison with similarTo used
+ * later in StyledText#setStyleRange will compare the same (modified) and won't
+ * realize an update happened.
+ */
+ metrics= new GlyphMetrics(0, 0, fullWidth);
}
} else {
metrics= null;

Back to the top