Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2008-10-01 10:46:28 +0000
committerDani Megert2008-10-01 10:46:28 +0000
commit0bc4762118f3af9ea3adb76f00a1ada4457d2b54 (patch)
tree8a130cd161ed9d0c1494c21b9f6c92c2519c93c3 /org.eclipse.search.tests
parent7f1d517e97256731a72e76f4611d11a80550d7b5 (diff)
downloadeclipse.platform.text-0bc4762118f3af9ea3adb76f00a1ada4457d2b54.tar.gz
eclipse.platform.text-0bc4762118f3af9ea3adb76f00a1ada4457d2b54.tar.xz
eclipse.platform.text-0bc4762118f3af9ea3adb76f00a1ada4457d2b54.zip
Added debug info to track down bug 249273: Test failures in I20080930-0921
Diffstat (limited to 'org.eclipse.search.tests')
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
index 37fccca737b..25579e59610 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/AnnotationManagerTest.java
@@ -91,23 +91,30 @@ public class AnnotationManagerTest extends TestCase {
AbstractTextSearchResult result= (AbstractTextSearchResult) fQuery1.getSearchResult();
Object[] files= result.getElements();
try {
+ System.out.println("AnnotationManagerTest.testAddAnnotation> file count: = " + files.length);
for (int i= 0; i < files.length; i++) {
- IFile file= (IFile) files[0];
+ IFile file= (IFile)files[i];
+ System.out.println("AnnotationManagerTest.testAddAnnotation> file: = " + file.getFullPath());
ITextEditor editor= (ITextEditor)IDE.openEditor(SearchPlugin.getActivePage(), file, true);
IAnnotationModel annotationModel= editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput());
annotationModel.getAnnotationIterator();
HashSet positions= new HashSet();
for (Iterator iter= annotationModel.getAnnotationIterator(); iter.hasNext();) {
Annotation annotation= (Annotation) iter.next();
+ System.out.println(" annotation: = " + annotation.getType());
if (annotation.getType().equals(fAnnotationTypeLookup.getAnnotationType(NewSearchUI.SEARCH_MARKER, IMarker.SEVERITY_INFO))) {
- positions.add(annotationModel.getPosition(annotation));
+ Position position= annotationModel.getPosition(annotation);
+ positions.add(position);
+ System.out.println(" found: " + position);
}
}
Match[] matches= result.getMatches(file);
+ System.out.println(" match count:" + matches.length);
for (int j= 0; j < matches.length; j++) {
Position position= new Position(matches[j].getOffset(), matches[j].getLength());
- assertTrue("position not found at: "+j, positions.remove(position)); //$NON-NLS-1$
+ System.out.println(" position[" + j + "] = " + position);
+ assertTrue("position not found at: " + j, positions.remove(position)); //$NON-NLS-1$
}
assertEquals(0, positions.size());

Back to the top