- Revision
- 774
- Author
- felix
- Date
- 2007-07-16 16:25:51 -0500 (Mon, 16 Jul 2007)
Log Message
replaced some of the deprecated code in the TestProject fixture
Modified Paths
Diff
Modified: trunk/plugins/eclipse/org.jbehave.plugin.eclipse.test/src/org/jbehave/plugin/eclipse/test/TestProject.java (773 => 774)
--- trunk/plugins/eclipse/org.jbehave.plugin.eclipse.test/src/org/jbehave/plugin/eclipse/test/TestProject.java 2007-07-16 21:25:00 UTC (rev 773) +++ trunk/plugins/eclipse/org.jbehave.plugin.eclipse.test/src/org/jbehave/plugin/eclipse/test/TestProject.java 2007-07-16 21:25:51 UTC (rev 774) @@ -21,6 +21,8 @@ import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IPluginRegistry; @@ -40,6 +42,7 @@ import org.eclipse.jdt.core.search.ITypeNameRequestor; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.launching.JavaRuntime; +import org.osgi.framework.Bundle; public class TestProject { @@ -169,11 +172,11 @@ } private Path findFileInPlugin(String plugin, String file) throws MalformedURLException, IOException { - IPluginRegistry registry= Platform.getPluginRegistry(); - IPluginDescriptor descriptor= registry.getPluginDescriptor(plugin); - URL pluginURL= descriptor.getInstallURL(); - URL jarURL= new URL(pluginURL, file); - URL localJarURL= Platform.asLocalURL(jarURL); + IExtensionRegistry registry= Platform.getExtensionRegistry(); + Bundle descriptor= Platform.getBundle(plugin); + URL jarURL= descriptor.getResource(file); + //URL jarURL= new URL(pluginURL, file); + URL localJarURL= FileLocator.toFileURL(jarURL); return new Path(localJarURL.getPath()); }
To unsubscribe from this list please visit:
