From 9c58a4552576f2b2390678dd56dbdbf679648375 Mon Sep 17 00:00:00 2001 From: axelcl Date: Fri, 24 Jun 2005 21:23:49 +0000 Subject: [PATCH] Tried to implement ConsoleLineTracker (see plugin.xml) for PHP stack traces in the console Doesn't work at the moment. --- .../phpdt/internal/launching/PHPInterpreter.java | 82 ++++++++++---------- 1 files changed, 41 insertions(+), 41 deletions(-) diff --git a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPInterpreter.java b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPInterpreter.java index f8b5ac1..acbbf91 100644 --- a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPInterpreter.java +++ b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/PHPInterpreter.java @@ -41,47 +41,47 @@ public class PHPInterpreter { return installLocation.toString(); } - private boolean executePHPProcess(String arguments, File workingDirectory, String[] env) { - Process process = null; - try { - StringBuffer buf = new StringBuffer(); - buf.append(getCommand() + " " + arguments); - process = Runtime.getRuntime().exec(buf.toString(), env, workingDirectory); - if (process != null) { - // construct a formatted command line for the process properties - - // for (int i= 0; i < args.length; i++) { - // buf.append(args[i]); - // buf.append(' '); - // } - - ILaunchConfigurationWorkingCopy wc = null; - try { - ILaunchConfigurationType lcType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType( - PHPLaunchConfigurationAttribute.PHP_LAUNCH_CONFIGURATION_TYPE); - String name = "PHP Launcher"; //$NON-NLS-1$ - wc = lcType.newInstance(null, name); - wc.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, true); - - ILaunch newLaunch = new Launch(wc, ILaunchManager.RUN_MODE, null); - IProcess iprocess = DebugPlugin.newProcess(newLaunch, process, "PHP Process"); //$NON-NLS-1$ - iprocess.setAttribute(IProcess.ATTR_CMDLINE, buf.toString()); - iprocess.setAttribute(IProcess.ATTR_PROCESS_TYPE, PHPLaunchConfigurationAttribute.PHP_LAUNCH_PROCESS_TYPE); - - DebugPlugin.getDefault().getLaunchManager().addLaunch(newLaunch); - - } catch (CoreException e) { - } - - return true; - - } - } catch (IOException e) { - return false; - } - return false; - - } +// private boolean executePHPProcess(String arguments, File workingDirectory, String[] env) { +// Process process = null; +// try { +// StringBuffer buf = new StringBuffer(); +// buf.append(getCommand() + " " + arguments); +// process = Runtime.getRuntime().exec(buf.toString(), env, workingDirectory); +// if (process != null) { +// // construct a formatted command line for the process properties +// +// // for (int i= 0; i < args.length; i++) { +// // buf.append(args[i]); +// // buf.append(' '); +// // } +// +// ILaunchConfigurationWorkingCopy wc = null; +// try { +// ILaunchConfigurationType lcType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType( +// PHPLaunchConfigurationAttribute.PHP_LAUNCH_CONFIGURATION_TYPE); +// String name = "PHP Launcher"; //$NON-NLS-1$ +// wc = lcType.newInstance(null, name); +// wc.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, true); +// +// ILaunch newLaunch = new Launch(wc, ILaunchManager.RUN_MODE, null); +// IProcess iprocess = DebugPlugin.newProcess(newLaunch, process, "PHP Process"); //$NON-NLS-1$ +// iprocess.setAttribute(IProcess.ATTR_CMDLINE, buf.toString()); +// iprocess.setAttribute(IProcess.ATTR_PROCESS_TYPE, PHPLaunchConfigurationAttribute.PHP_LAUNCH_PROCESS_TYPE); +// +// DebugPlugin.getDefault().getLaunchManager().addLaunch(newLaunch); +// +// } catch (CoreException e) { +// } +// +// return true; +// +// } +// } catch (IOException e) { +// return false; +// } +// return false; +// +// } public Process exec(String arguments, File workingDirectory, String[] env) throws IOException { return Runtime.getRuntime().exec(getCommand() + " " + arguments, env, workingDirectory); -- 1.7.1