From ae1ab1b6259eeb1a7b98e3cf66fc19b003a16ca8 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Mon, 2 Oct 2006 09:30:32 +0000 Subject: [PATCH] Fixes call hierarchy test cases. --- .../eclipse/cdt/core/testplugin/util/TestSourceReader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java index 35e685c1ad6..29f61eca16d 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java @@ -19,7 +19,6 @@ import java.io.LineNumberReader; import junit.framework.Assert; -import org.eclipse.cdt.core.testplugin.CTestPlugin; import org.eclipse.core.filebuffers.FileBuffers; import org.eclipse.core.filebuffers.ITextFileBuffer; import org.eclipse.core.filebuffers.ITextFileBufferManager; @@ -30,6 +29,7 @@ import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; +import org.osgi.framework.Bundle; public class TestSourceReader { @@ -62,10 +62,10 @@ public class TestSourceReader { * is started with '// {tag}' and ends with the first line not started by '//' * @since 4.0 */ - public static String readTaggedComment(Class clazz, final String tag) throws IOException { + public static String readTaggedComment(Bundle bundle, Class clazz, final String tag) throws IOException { IPath filePath= new Path("ui/" + clazz.getName().replace('.', '/') + ".java"); - InputStream in= FileLocator.openStream(CTestPlugin.getDefault().getBundle(), filePath, false); + InputStream in= FileLocator.openStream(bundle, filePath, false); LineNumberReader reader= new LineNumberReader(new InputStreamReader(in)); boolean found= false; final StringBuffer content= new StringBuffer();