@NbBundle.Messages({ "# {0} - project name", "InternalWebServer.output.title=Internal WebServer [{0}]" }) private Future<Integer> createProcess() { // validate PhpInterpreter phpInterpreter; try { phpInterpreter = PhpInterpreter.getDefault(); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage()); return null; } RunConfigInternal runConfig = RunConfigInternal.forProject(project); if (RunConfigInternalValidator.validateCustomizer(runConfig) != null) { PhpProjectUtils.openCustomizerRun(project); return null; } // run return new PhpExecutable(phpInterpreter.getInterpreter()) .viaAutodetection(false) .viaPhpInterpreter(false) .workDir(runConfig.getWorkDir()) .additionalParameters(getParameters(runConfig)) .displayName(Bundle.InternalWebServer_output_title(project.getName())) .run(getDescriptor()); }
@Override public void runCommand(CommandDescriptor commandDescriptor, Runnable postExecution) { String[] commands = commandDescriptor.getFrameworkCommand().getCommands(); String[] commandParams = commandDescriptor.getCommandParams(); List<String> params = new ArrayList<String>(commands.length + commandParams.length); params.addAll(Arrays.asList(commands)); params.addAll(Arrays.asList(commandParams)); try { YiiScript.forPhpModule(phpModule, false).runCommand(phpModule, params, postExecution); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), YiiScript.OPTIONS_SUB_PATH); } }
@Override public String getErrorMessage() { try { PhpInterpreter.getDefault(); } catch (InvalidPhpExecutableException ex) { return ex.getLocalizedMessage(); } try { SymfonyScript.getDefault(); } catch (InvalidPhpExecutableException ex) { return NbBundle.getMessage( SymfonyPhpModuleExtender.class, "MSG_CannotExtend", ex.getMessage()); } return getPanel().getErrorMessage(); }