Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2004-02-16 03:57:06 +0000
committerDoug Schaefer2004-02-16 03:57:06 +0000
commit5bebbf536733efaffe063a8e61a718cfb70324e9 (patch)
tree02da8e6144d1de6d0be1d340ad9910690a158990 /core/org.eclipse.cdt.ui.tests
parent7e32d05829ae25bb1d9048b6df48d0d47354d980 (diff)
downloadorg.eclipse.cdt-5bebbf536733efaffe063a8e61a718cfb70324e9.tar.gz
org.eclipse.cdt-5bebbf536733efaffe063a8e61a718cfb70324e9.tar.xz
org.eclipse.cdt-5bebbf536733efaffe063a8e61a718cfb70324e9.zip
Fixed the tests to use the CTestPlugin findFileInPlugin
method. This should get the tests working on M6 and M7.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
index 61a257debb..4c4de46624 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
@@ -32,13 +32,14 @@ import org.eclipse.cdt.internal.core.model.TranslationUnit;
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProcessor;
import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.cdt.testplugin.CTestPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
@@ -75,7 +76,6 @@ public abstract class CompletionProposalsBaseTest extends TestCase{
protected void setUp() throws Exception {
monitor = new NullProgressMonitor();
- String pluginRoot = Platform.asLocalURL(Platform.getPlugin(pluginName).getDescriptor().getInstallURL()).getFile();
fCProject= CProjectHelper.createCProject(projectName, projectType);
fHeaderFile = fCProject.getProject().getFile(getHeaderFileName());
@@ -83,10 +83,11 @@ public abstract class CompletionProposalsBaseTest extends TestCase{
fCFile = fCProject.getProject().getFile(fileName);
if ( (!fCFile.exists()) &&( !fHeaderFile.exists() )) {
try{
- FileInputStream headerFileIn = new FileInputStream(pluginRoot+ getHeaderFileFullPath());
+ FileInputStream headerFileIn = new FileInputStream(
+ CTestPlugin.getDefault().getFileInPlugin(new Path(getHeaderFileFullPath())));
fHeaderFile.create(headerFileIn,false, monitor);
- String fileFullPath = pluginRoot+ getFileFullPath();
- FileInputStream bodyFileIn = new FileInputStream(fileFullPath);
+ FileInputStream bodyFileIn = new FileInputStream(
+ CTestPlugin.getDefault().getFileInPlugin(new Path(getFileFullPath())));
fCFile.create(bodyFileIn,false, monitor);
} catch (CoreException e) {
e.printStackTrace();

Back to the top