import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.views.PHPConsole;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import sun.security.krb5.internal.crypto.e;
public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
protected IWorkbenchWindow activeWindow = null;
execute(form.format(arguments), "Start Apache: ");
}
- public void execute(String command, String consoleMessage) {
+ public static String execute(String command, String consoleMessage) {
// MessageDialog.openInformation(activeWindow.getShell(), "Exec command: ", command);
try {
PHPConsole.write(consoleMessage+command+"\n");
// gets the input stream to have the post-compile-time information
InputStream stream = p.getInputStream();
- // and get the string from it
- String compilerOutput = PHPConsole.getStringFromStream(stream);
+ // get the string from Stream
+ String consoleOutput = PHPConsole.getStringFromStream(stream);
// prints out the information
- PHPConsole.write(compilerOutput);
-
- // parse the buffer to find the errors and create markers
- // createMarkers(compilerOutput, fileToCompile);
+ PHPConsole.write(consoleOutput);
+ return consoleOutput;
} catch (IOException e) {
- // @todo should throw the exception again
+
System.err.println("Problem");
e.printStackTrace();
-// } catch (CoreException e) {
-// e.printStackTrace();
-// // @todo do something here !
+
}
+ return "";
}
public void selectionChanged(IAction action, ISelection selection) {