11/*******************************************************************************
2- * Copyright (c) 2009, 2013 Wind River Systems and others.
2+ * Copyright (c) 2009, 2025 Wind River Systems and others.
33 *
44 * This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License 2.0
2424import org .eclipse .core .resources .ResourcesPlugin ;
2525import org .eclipse .core .runtime .CoreException ;
2626import org .eclipse .core .runtime .FileLocator ;
27- import org .eclipse .core .runtime .IPath ;
2827import org .osgi .framework .Bundle ;
2928import org .osgi .framework .FrameworkUtil ;
3029
@@ -38,15 +37,17 @@ public class TestsPlugin {
3837 public static final String PLUGIN_ID = "org.eclipse.debug.tests" ; //$NON-NLS-1$
3938
4039 /**
41- * Returns the file corresponding to the specified path from within this bundle
42- * @return the file corresponding to the specified path from within this bundle, or
43- * <code>null</code> if not found
40+ * Returns the file corresponding to the specified path from within this
41+ * bundle
42+ *
43+ * @return the file corresponding to the specified path from within this
44+ * bundle, or <code>null</code> if not found
4445 */
45- public static File getFileInPlugin (IPath path ) {
46+ public static File getFileInPlugin (String path ) {
4647 try {
4748 Bundle bundle = FrameworkUtil .getBundle (TestsPlugin .class );
48- URL installURL = new URL ( bundle .getEntry ("/" ), path . toString () ); //$NON-NLS-1$
49- URL localURL = FileLocator .toFileURL ( installURL ); //Platform.asLocalURL (installURL);
49+ URL installURL = bundle .getEntry ("/" + path ); //$NON-NLS-1$
50+ URL localURL = FileLocator .toFileURL (installURL );
5051 return new File (localURL .getFile ());
5152 } catch (IOException e ) {
5253 return null ;
@@ -55,6 +56,7 @@ public static File getFileInPlugin(IPath path) {
5556
5657 /**
5758 * Creates a new project with the specified name
59+ *
5860 * @return a new project with the specified name
5961 */
6062 public static IProject createProject (String projectName ) throws CoreException {
0 commit comments