diff options
author | Chris Recoskie | 2009-04-22 12:39:53 +0000 |
---|---|---|
committer | Chris Recoskie | 2009-04-22 12:39:53 +0000 |
commit | 68718b41f92d34f1ecf69c7b3123084e93e31592 (patch) | |
tree | 3bc25cba3c2bccb1121222fb6ec770f7bf211311 /debug | |
parent | 724860a02bb21d22a053122ae675b73ae0e352eb (diff) | |
download | org.eclipse.cdt-68718b41f92d34f1ecf69c7b3123084e93e31592.tar.gz org.eclipse.cdt-68718b41f92d34f1ecf69c7b3123084e93e31592.tar.xz org.eclipse.cdt-68718b41f92d34f1ecf69c7b3123084e93e31592.zip |
RESOLVED - bug 272986: changes to ICommandLauncher
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272986
Diffstat (limited to 'debug')
2 files changed, 21 insertions, 8 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java index c7d0282b2cc..cdcef8cff69 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java +++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentCD.java @@ -15,6 +15,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import org.eclipse.cdt.core.CommandLauncher; import org.eclipse.cdt.core.ICommandLauncher; +import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Path; /** @@ -29,9 +30,15 @@ public class CygwinMIEnvironmentCD extends WinMIEnvironmentCD { ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream err = new ByteArrayOutputStream(); String newPath = null; - launcher.execute( new Path( "cygpath" ), //$NON-NLS-1$ - new String[]{ "-u", path }, //$NON-NLS-1$ - new String[0], new Path( "." ) ); //$NON-NLS-1$ + try { + launcher.execute( new Path( "cygpath" ), //$NON-NLS-1$ + new String[]{ "-u", path }, //$NON-NLS-1$ + new String[0], new Path( "." ), + null); + } catch (CoreException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } //$NON-NLS-1$ if ( launcher.waitAndRead( out, err ) == ICommandLauncher.OK ) { newPath = out.toString(); if ( newPath != null ) { diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java index e06a9b7b354..1991542dd51 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java +++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinMIEnvironmentDirectory.java @@ -16,6 +16,7 @@ import java.util.StringTokenizer; import org.eclipse.cdt.core.CommandLauncher; import org.eclipse.cdt.core.ICommandLauncher; import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentDirectory; +import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Path; /** @@ -88,11 +89,16 @@ public class CygwinMIEnvironmentDirectory extends MIEnvironmentDirectory { String result = path; ICommandLauncher launcher = new CommandLauncher(); ByteArrayOutputStream out = new ByteArrayOutputStream(); - launcher.execute( - new Path("cygpath"), //$NON-NLS-1$ - new String[] { "-p", "-u", path }, //$NON-NLS-1$ //$NON-NLS-2$ - new String[0], - new Path(".")); //$NON-NLS-1$ + try { + launcher.execute( + new Path("cygpath"), //$NON-NLS-1$ + new String[] { "-p", "-u", path }, //$NON-NLS-1$ //$NON-NLS-2$ + new String[0], + new Path("."), null); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } //$NON-NLS-1$ if (launcher.waitAndRead(out, out) == ICommandLauncher.OK) result = out.toString().trim(); return result; |