protected IWorkbenchWindow activeWindow = null;
public void run(IAction action) {
- final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ final IPreferenceStore store =
+ PHPeclipsePlugin.getDefault().getPreferenceStore();
String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
// replace backslash with slash in the DocumentRoot under Windows
documentRoot = documentRoot.replace('\\', '/');
String[] arguments = { documentRoot };
- MessageFormat form = new MessageFormat(store.getString(PHPeclipsePlugin.APACHE_START_PREF));
+ MessageFormat form =
+ new MessageFormat(store.getString(PHPeclipsePlugin.APACHE_START_PREF));
execute(
"apache_start",
store.getString(PHPeclipsePlugin.APACHE_RUN_PREF),
* @param arguments arguments for this configuration
* @param background run this configuration in background mode
*/
- public static void execute(String command, String executable, String arguments, boolean background) {
+ public static void execute(
+ String command,
+ String executable,
+ String arguments,
+ boolean background) {
PHPConsole console = PHPConsole.getInstance();
String consoleMessage;
if (background) {
- consoleMessage = "run in background mode-" + command + ": " + executable + " " + arguments;
+ consoleMessage =
+ "run in background mode-"
+ + command
+ + ": "
+ + executable
+ + " "
+ + arguments;
} else {
- consoleMessage = "run in foreground mode-" + command + ": " + executable + " " + arguments;
+ consoleMessage =
+ "run in foreground mode-"
+ + command
+ + ": "
+ + executable
+ + " "
+ + arguments;
}
console.write(consoleMessage + "\n");
public static String getParserOutput(String command, String consoleMessage) {
// MessageDialog.openInformation(activeWindow.getShell(), "Exec command: ", command);
try {
- PHPConsole console = PHPConsole.getInstance();
- if (console != null) {
- console.write(consoleMessage + command + "\n");
+ PHPConsole console = null;
+ try {
+ console = PHPConsole.getInstance();
+ if (console != null) {
+ console.write(consoleMessage + command + "\n");
+ }
+ } catch (Throwable th) {
+
}
Runtime runtime = Runtime.getRuntime();