@Override
    protected void notifyProcessTerminated(int exitCode) {
      try {
        final List<VirtualFile> jars = new ArrayList<>();
        for (String line : myStdOut.toString().split("\n")) {
          if (line.startsWith(GrapeRunner.URL_PREFIX)) {
            try {
              final URL url = new URL(line.substring(GrapeRunner.URL_PREFIX.length()));
              final File libFile = new File(url.toURI());
              if (libFile.exists() && libFile.getName().endsWith(".jar")) {
                ContainerUtil.addIfNotNull(jars, LocalFileSystem.getInstance().refreshAndFindFileByIoFile(libFile));
              }
            }
            catch (MalformedURLException | URISyntaxException e) {
              LOG.error(e);
            }
          }
        }
        WriteAction.runAndWait(() -> {
          jarCount = jars.size();
          if (jarCount == 0) {
            messages = new HtmlBuilder()
              .append(processOutputChunk(myStdOut.toString()))
              .append(processOutputChunk(myStdErr.toString()))
              .toFragment();
          }
          if (!jars.isEmpty()) {
            addGrapeDependencies(jars);
          }
        });
      }
      finally {
        super.notifyProcessTerminated(exitCode);
      }
    }
@Override
    protected void notifyProcessTerminated(int exitCode)