GitLineHandlerListener (final @NotNull ProgressIndicator indicator) { final GitStandardProgressAnalyzer progressAnalyzer = new GitStandardProgressAnalyzer(); return new GitLineHandlerListener() { @Override public void onLineAvailable(String line, Key outputType) { final double fraction = progressAnalyzer.analyzeProgress(line); if (fraction >= 0) { indicator.setIndeterminate(false); indicator.setFraction(fraction); indicator.setText2(line); } } }; }