Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Pogorzelski2014-08-04 14:48:26 +0000
committerDani Megert2014-08-04 14:50:12 +0000
commitb26f03400a722ad201ebadd035efb52bc7fb419b (patch)
treee7fe6d979d73180bd677143624804710fdb10048
parentc2120aa1ce5ecc8234f3e96beac09a2b4bb92557 (diff)
downloadeclipse.platform.text-b26f03400a722ad201ebadd035efb52bc7fb419b.tar.gz
eclipse.platform.text-b26f03400a722ad201ebadd035efb52bc7fb419b.tar.xz
eclipse.platform.text-b26f03400a722ad201ebadd035efb52bc7fb419b.zip
Fixed bug 410359: [projection] ProjectionViewer.computeCollapsedNestedAnnotations unnecessary slow
Signed-off-by: Pawel Pogorzelski <pawel.pogorzelski1@gmail.com>
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
index 0d509e1e0d5..3dff2a4dc4d 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Tom Eicher (Avaloq Evolution AG) - block selection mode
* Anton Leherbauer <anton.leherbauer@windriver.com> - [projection] Eclipse is too eager to unfold code - http://bugs.eclipse.org/178203
+ * Pawel Pogorzelski <pawel.pogorzelski1@gmail.com> - [projection] ProjectionViewer.computeCollapsedNestedAnnotations unnecessary slow - http://bugs.eclipse.org/410359
*******************************************************************************/
package org.eclipse.jface.text.source.projection;
@@ -1043,7 +1044,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
private ProjectionAnnotation[] computeCollapsedNestedAnnotations(int offset, int length) {
List annotations= new ArrayList(5);
- Iterator e= fProjectionAnnotationModel.getAnnotationIterator();
+ Iterator e= fProjectionAnnotationModel.getAnnotationIterator(offset, length, false, false);
while (e.hasNext()) {
ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
if (annotation.isCollapsed()) {
@@ -1052,8 +1053,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
// annotation might already be deleted, we will be informed later on about this deletion
continue;
}
- if (covers(offset, length, position))
- annotations.add(annotation);
+ annotations.add(annotation);
}
}

Back to the top