Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangelozerr2017-12-20 10:06:04 +0000
committerangelozerr2017-12-20 10:06:04 +0000
commit68448cfb817307ad9b35f97b62b87b02389cf0e8 (patch)
tree4bddf4dd29d0381dc30d0af271b8ac2c61fc9c1b /org.eclipse.jface.text.examples
parent1318c013824ccc86b3371748147b4c8c731235df (diff)
downloadeclipse.platform.text-68448cfb817307ad9b35f97b62b87b02389cf0e8.tar.gz
eclipse.platform.text-68448cfb817307ad9b35f97b62b87b02389cf0e8.tar.xz
eclipse.platform.text-68448cfb817307ad9b35f97b62b87b02389cf0e8.zip
Bug 528980 - [CodeMining] CodeMining are not displayed after a scrollI20171220-2000
when there are folded content below Change-Id: I03bebb5ea56aaf91f970605a8bd77d1807bafb32 Signed-off-by: angelozerr <angelo.zerr@gmail.com>
Diffstat (limited to 'org.eclipse.jface.text.examples')
-rw-r--r--org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorAnnotation.java7
-rw-r--r--org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorStatusAnnotation.java6
-rw-r--r--org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/InlinedAnnotationDemo.java4
3 files changed, 9 insertions, 8 deletions
diff --git a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorAnnotation.java b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorAnnotation.java
index 9af22ac48e1..a6e7a318768 100644
--- a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorAnnotation.java
+++ b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorAnnotation.java
@@ -1,4 +1,4 @@
-/**
+/**s
* Copyright (c) 2017 Angelo ZERR.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
package org.eclipse.jface.text.examples.sources.inlined;
import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.inlined.LineContentAnnotation;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
@@ -25,8 +26,8 @@ public class ColorAnnotation extends LineContentAnnotation {
private Color color;
- public ColorAnnotation(Position pos, StyledText styledText) {
- super(pos, styledText);
+ public ColorAnnotation(Position pos, ISourceViewer viewer) {
+ super(pos, viewer);
}
@Override
diff --git a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorStatusAnnotation.java b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorStatusAnnotation.java
index 63e14e36ace..00503ca9f07 100644
--- a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorStatusAnnotation.java
+++ b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/ColorStatusAnnotation.java
@@ -11,8 +11,8 @@
package org.eclipse.jface.text.examples.sources.inlined;
import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.inlined.LineHeaderAnnotation;
-import org.eclipse.swt.custom.StyledText;
/**
* Color status annotation shows the result of rgb parse before each line which
@@ -20,8 +20,8 @@ import org.eclipse.swt.custom.StyledText;
*/
public class ColorStatusAnnotation extends LineHeaderAnnotation {
- public ColorStatusAnnotation(Position position, StyledText styledText) {
- super(position, styledText);
+ public ColorStatusAnnotation(Position position, ISourceViewer viewer) {
+ super(position, viewer);
}
public void setStatus(String status) {
diff --git a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/InlinedAnnotationDemo.java b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/InlinedAnnotationDemo.java
index a911388248f..3f3d81575a2 100644
--- a/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/InlinedAnnotationDemo.java
+++ b/org.eclipse.jface.text.examples/src/org/eclipse/jface/text/examples/sources/inlined/InlinedAnnotationDemo.java
@@ -163,7 +163,7 @@ public class InlinedAnnotationDemo {
Position pos = Positions.of(i, document, true);
ColorStatusAnnotation statusAnnotation = support.findExistingAnnotation(pos);
if (statusAnnotation == null) {
- statusAnnotation = new ColorStatusAnnotation(pos, viewer.getTextWidget());
+ statusAnnotation = new ColorStatusAnnotation(pos, viewer);
}
statusAnnotation.setStatus(status);
annotations.add(statusAnnotation);
@@ -173,7 +173,7 @@ public class InlinedAnnotationDemo {
Position colorPos = new Position(pos.offset + index + "color:".length(), rgb.length());
ColorAnnotation colorAnnotation = support.findExistingAnnotation(colorPos);
if (colorAnnotation == null) {
- colorAnnotation = new ColorAnnotation(colorPos, viewer.getTextWidget());
+ colorAnnotation = new ColorAnnotation(colorPos, viewer);
}
colorAnnotation.setColor(color);
annotations.add(colorAnnotation);

Back to the top