Search in sources :

Example 1 with TaskStatus

use of jadx.gui.jobs.TaskStatus in project jadx by skylot.

the class MainWindow method processDecompilationResults.

private void processDecompilationResults(ProcessResult decompile, ProcessResult index) {
    int skippedCls = Math.max(decompile.getSkipped(), index.getSkipped());
    if (skippedCls == 0) {
        return;
    }
    TaskStatus status = mergeStatus(EnumSet.of(decompile.getStatus(), index.getStatus()));
    LOG.warn("Decompile and indexing of some classes skipped: {}, status: {}", skippedCls, status);
    switch(status) {
        case CANCEL_BY_USER:
            {
                String reason = NLS.str("message.userCancelTask");
                String message = NLS.str("message.indexIncomplete", reason, skippedCls);
                JOptionPane.showMessageDialog(this, message);
                break;
            }
        case CANCEL_BY_TIMEOUT:
            {
                String reason = NLS.str("message.taskTimeout", decompile.getTimeLimit());
                String message = NLS.str("message.indexIncomplete", reason, skippedCls);
                JOptionPane.showMessageDialog(this, message);
                break;
            }
        case CANCEL_BY_MEMORY:
            {
                showHeapUsageBar();
                JOptionPane.showMessageDialog(this, NLS.str("message.indexingClassesSkipped", skippedCls));
                break;
            }
    }
}
Also used : TaskStatus(jadx.gui.jobs.TaskStatus)

Aggregations

TaskStatus (jadx.gui.jobs.TaskStatus)1