1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Some clean up to make the core.tests plugin more 3.0 compliant.

Also added in a new ProjectCreator that creates projects from
prebuilt zip files.
This commit is contained in:
Doug Schaefer 2004-11-21 15:53:55 +00:00
parent 753aa6132f
commit b34fcf2fc9
3 changed files with 8 additions and 12 deletions

View file

@ -32,9 +32,9 @@ import org.eclipse.core.runtime.Path;
/**
* This is a utility class that properly creates a project for testing
* core features. Projects are created from a template stored in the
* resources/zips directory. These templates are created using the CDT
* and have the proper natures and build settings set up.
* core features. Projects are created from a template stored in a zip file
* These templates are created using the CDT and have the proper natures
* and build settings set up.
*
* @author Doug Schaefer
*/

View file

@ -14,10 +14,10 @@ import junit.framework.Test;
import junit.framework.TestListener;
import junit.framework.TestResult;
import org.eclipse.core.boot.IPlatformRunnable;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.testing.ITestHarness;
@ -30,7 +30,7 @@ import org.w3c.dom.ProcessingInstruction;
/**
* @see IPlatformRunnable
*/
public class RunTests implements IPlatformRunnable, ITestHarness, TestListener {
public class RunTests implements ITestHarness, TestListener {
private TestableObject testableObject;
private PrintStream stream;

View file

@ -6,14 +6,12 @@ package org.eclipse.cdt.testplugin;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
@ -23,8 +21,8 @@ public class CTestPlugin extends Plugin {
public static final String PLUGIN_ID = "org.eclipse.cdt.core.tests";
private static CTestPlugin fgDefault;
public CTestPlugin(IPluginDescriptor descriptor) {
super(descriptor);
public CTestPlugin() {
super();
fgDefault= this;
}
@ -46,9 +44,7 @@ public class CTestPlugin extends Plugin {
public File getFileInPlugin(IPath path) {
try {
URL installURL= new URL(getDescriptor().getInstallURL(), path.toString());
URL localURL= Platform.asLocalURL(installURL);
return new File(localURL.getFile());
return new File(Platform.asLocalURL(find(path)).getFile());
} catch (IOException e) {
return null;
}