Ejemplo n.º 1
0
 @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());
 }