@Override public void decompilationFailed(List<String> inputPath, String message) { progressEstimate.addWork(1); }
@Override public void decompilationFailed(List<String> inputPath, String message) { progressEstimate.addWork(1); }
@Override public void decompilationFailed(List<String> inputPath, String message) { ClassDecompileRequest request = requestMap.get(inputPath); ProcyonDecompiler procyon = new ProcyonDecompiler(); DecompilationResult result = procyon.decompileClassFile(request.getRootDirectory(), request.getClassFile(), request.getOutputDirectory()); if (!result.getFailures().isEmpty()) { LOG.warning("Failsafe Procyon decompilation of " + inputPath + " failed!"); progressEstimate.addWork(1); } else { for (Map.Entry<String, String> decompiledFile : result.getDecompiledFiles().entrySet()) { LOG.info("Failsafe Procyon decompilation of " + inputPath + " successful!"); fileDecompiled(Collections.singletonList(decompiledFile.getKey()), decompiledFile.getValue()); } } }
@Override public void decompilationFailed(List<String> inputPath, String message) { ClassDecompileRequest request = requestMap.get(inputPath); ProcyonDecompiler procyon = new ProcyonDecompiler(); DecompilationResult result = procyon.decompileClassFile(request.getRootDirectory(), request.getClassFile(), request.getOutputDirectory()); if (!result.getFailures().isEmpty()) { LOG.warning("Failsafe Procyon decompilation of " + inputPath + " failed!"); progressEstimate.addWork(1); } else { for (Map.Entry<String, String> decompiledFile : result.getDecompiledFiles().entrySet()) { LOG.info("Failsafe Procyon decompilation of " + inputPath + " successful!"); fileDecompiled(Collections.singletonList(decompiledFile.getKey()), decompiledFile.getValue()); } } }
progressEstimate.addWork(1); if (progressEstimate.getWorked() % 250 == 0)
progressEstimate.addWork(1); if (progressEstimate.getWorked() % 250 == 0)
progressEstimate.addWork(1); if (progressEstimate.getWorked() % 250 == 0)
progressEstimate.addWork(1); if (progressEstimate.getWorked() % 250 == 0)
@Override public void perform(GraphRewrite event, EvaluationContext context) { if (event.shouldWindupStop()) { throw new WindupStopException("Request to stop detected during iteration related to: " + messagePrefix); } if (totalIterations == -1) { @SuppressWarnings("unchecked") Iterable<WindupVertexFrame> frames = (Iterable<WindupVertexFrame>) event.getRewriteContext().get(Iteration.DEFAULT_VARIABLE_LIST_STRING); totalIterations = Iterators.asList(frames).size(); progressEstimate = new ProgressEstimate(totalIterations); } progressEstimate.addWork(1); if (progressEstimate.getWorked() % interval == 0) { if (estimateTimeRemaining) { long remainingTimeMillis = progressEstimate.getTimeRemainingInMillis(); if (remainingTimeMillis > 1000) event.ruleEvaluationProgress(messagePrefix, progressEstimate.getWorked(), totalIterations, (int) remainingTimeMillis / 1000); } LOG.info(messagePrefix + ": " + progressEstimate.getWorked() + " / " + totalIterations); } }
@Override public void perform(GraphRewrite event, EvaluationContext context) { if (event.shouldWindupStop()) { throw new WindupStopException("Request to stop detected during iteration related to: " + messagePrefix); } if (totalIterations == -1) { @SuppressWarnings("unchecked") Iterable<WindupVertexFrame> frames = (Iterable<WindupVertexFrame>) event.getRewriteContext().get(Iteration.DEFAULT_VARIABLE_LIST_STRING); totalIterations = Iterators.asList(frames).size(); progressEstimate = new ProgressEstimate(totalIterations); } progressEstimate.addWork(1); if (progressEstimate.getWorked() % interval == 0) { if (estimateTimeRemaining) { long remainingTimeMillis = progressEstimate.getTimeRemainingInMillis(); if (remainingTimeMillis > 1000) event.ruleEvaluationProgress(messagePrefix, progressEstimate.getWorked(), totalIterations, (int) remainingTimeMillis / 1000); } LOG.info(messagePrefix + ": " + progressEstimate.getWorked() + " / " + totalIterations); } }