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

removed deprecated dependancy

This commit is contained in:
David Inglis 2004-05-18 15:54:07 +00:00
parent 0a0eb69d98
commit 8fea90aff6

View file

@ -12,9 +12,9 @@ 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.IPluginDescriptor;
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;
/* /*
* Currently this will only work for Windows XP since tasklist * Currently this will only work for Windows XP since tasklist
@ -31,9 +31,10 @@ public class ProcessList implements IProcessList {
Process p = null; Process p = null;
String command = null; String command = null;
InputStream in = null; InputStream in = null;
IPluginDescriptor desc = CCorePlugin.getDefault().getDescriptor(); Bundle bundle = Platform.getBundle(CCorePlugin.PLUGIN_ID);
try { try {
URL url = desc.find(new Path("$os$/listtasks.exe")); //$NON-NLS-1$ URL url = Platform.find(bundle, new Path("$os$/listtasks.exe")); //$NON-NLS-1$
url = Platform.resolve(url); url = Platform.resolve(url);
String path = url.getFile(); String path = url.getFile();
File file = new File(path); File file = new File(path);