1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Fix warnings.

This commit is contained in:
Markus Schorn 2008-04-24 15:45:37 +00:00
parent 9ae3086a27
commit 6875e287df

View file

@ -22,6 +22,7 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IProcessInfo; import org.eclipse.cdt.core.IProcessInfo;
import org.eclipse.cdt.core.IProcessList; import org.eclipse.cdt.core.IProcessList;
import org.eclipse.cdt.utils.spawner.ProcessFactory; import org.eclipse.cdt.utils.spawner.ProcessFactory;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
@ -44,8 +45,9 @@ public class ProcessList implements IProcessList {
Bundle bundle = Platform.getBundle(CCorePlugin.PLUGIN_ID); Bundle bundle = Platform.getBundle(CCorePlugin.PLUGIN_ID);
try { try {
URL url = Platform.find(bundle, new Path("$os$/listtasks.exe")); //$NON-NLS-1$ URL url = FileLocator.find(bundle, new Path("$os$/listtasks.exe"), null); //$NON-NLS-1$
url = Platform.resolve(url); if (url != null) {
url = FileLocator.resolve(url);
String path = url.getFile(); String path = url.getFile();
File file = new File(path); File file = new File(path);
if (file.exists()) { if (file.exists()) {
@ -57,6 +59,7 @@ public class ProcessList implements IProcessList {
return parseListTasks(reader); return parseListTasks(reader);
} }
} }
}
} catch (IOException e) { } catch (IOException e) {
} }
return NOPROCESS; return NOPROCESS;