mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
IJ-CR-108265 [java-decompiler] IDEA-198397 add cancelled checks for java-decompiler. Refresh api
GitOrigin-RevId: 0edb31b19b393df6981c3785d2a7368226c70114
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d795671583
commit
59b359c191
@@ -7,10 +7,14 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.java.decompiler.main.CancellationManager;
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public class IdeaCancellationManager extends CancellationManager.SimpleWithTimeoutCancellationManager {
|
||||
public class IdeaCancellationManager extends CancellationManager.TimeoutCancellationManager {
|
||||
|
||||
public IdeaCancellationManager(int maxMethodTimeoutSec) {
|
||||
super(maxMethodTimeoutSec);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkCanceled() throws CanceledException, TimeExceedException {
|
||||
public void checkCanceled() throws CanceledException {
|
||||
try {
|
||||
ProgressManager.checkCanceled();
|
||||
}
|
||||
|
||||
@@ -147,8 +147,9 @@ class IdeaDecompiler : ClassFileDecompilers.Light() {
|
||||
val provider = MyBytecodeProvider(files)
|
||||
val saver = MyResultSaver()
|
||||
|
||||
val maxSecProcessingMethod = options[IFernflowerPreferences.MAX_PROCESSING_METHOD]?.toString()?.toIntOrNull() ?: 0
|
||||
val decompiler = BaseDecompiler(provider, saver, options, myLogger.value,
|
||||
IdeaCancellationManager())
|
||||
IdeaCancellationManager(maxSecProcessingMethod))
|
||||
files.forEach { decompiler.addSource(File(it.path)) }
|
||||
try {
|
||||
decompiler.decompileContext()
|
||||
|
||||
Reference in New Issue
Block a user