mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[java-decompiler] IDEA-323804 Delete the threshold for decompiling
GitOrigin-RevId: 6bc5c98d7ae46ec74435b17b43de1a833db808cf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ea026eaaef
commit
8045caf11c
@@ -37,7 +37,6 @@ public interface IFernflowerPreferences {
|
||||
|
||||
String LOG_LEVEL = "log";
|
||||
String MAX_PROCESSING_METHOD = "mpm";
|
||||
String MAX_BYTES_CLASS_NOT_UNDER_PROGRESS = "mbcnup";
|
||||
String RENAME_ENTITIES = "ren";
|
||||
String USER_RENAMER_CLASS = "urc";
|
||||
String NEW_LINE_SEPARATOR = "nls";
|
||||
@@ -84,7 +83,6 @@ public interface IFernflowerPreferences {
|
||||
|
||||
defaults.put(LOG_LEVEL, IFernflowerLogger.Severity.INFO.name());
|
||||
defaults.put(MAX_PROCESSING_METHOD, "0");
|
||||
defaults.put(MAX_BYTES_CLASS_NOT_UNDER_PROGRESS, "0");
|
||||
defaults.put(RENAME_ENTITIES, "0");
|
||||
defaults.put(NEW_LINE_SEPARATOR, (InterpreterUtil.IS_WINDOWS ? "0" : "1"));
|
||||
defaults.put(INDENT_STRING, " ");
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.intellij.psi.compiled.ClassFileDecompilers
|
||||
import com.intellij.psi.impl.compiled.ClsFileImpl
|
||||
import com.intellij.ui.components.LegalNoticeDialog
|
||||
import com.intellij.util.FileContentUtilCore
|
||||
import com.intellij.util.ui.EDT
|
||||
import org.jetbrains.java.decompiler.main.CancellationManager
|
||||
import org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler
|
||||
import org.jetbrains.java.decompiler.main.extern.ClassFormatException
|
||||
@@ -62,7 +61,6 @@ class IdeaDecompiler : ClassFileDecompilers.Light() {
|
||||
IFernflowerPreferences.NEW_LINE_SEPARATOR to "1",
|
||||
IFernflowerPreferences.BANNER to BANNER,
|
||||
IFernflowerPreferences.MAX_PROCESSING_METHOD to 60,
|
||||
IFernflowerPreferences.MAX_BYTES_CLASS_NOT_UNDER_PROGRESS to 150_000, //approximately 9_000 lines
|
||||
IFernflowerPreferences.INDENT_STRING to indent,
|
||||
IFernflowerPreferences.IGNORE_INVALID_BYTECODE to "1",
|
||||
IFernflowerPreferences.VERIFY_ANONYMOUS_CLASSES to "1",
|
||||
@@ -131,15 +129,7 @@ class IdeaDecompiler : ClassFileDecompilers.Light() {
|
||||
return previous
|
||||
}
|
||||
else {
|
||||
val maxBytesNotUnderProgress = myOptions.value[IFernflowerPreferences.MAX_BYTES_CLASS_NOT_UNDER_PROGRESS]?.toString()?.toIntOrNull() ?: 0
|
||||
return if (!ApplicationManager.getApplication().isUnitTestMode &&
|
||||
(maxBytesNotUnderProgress > 0 && EDT.isCurrentThreadEdt() &&
|
||||
file.length > maxBytesNotUnderProgress)) {
|
||||
ClsFileImpl.decompile(file)
|
||||
}
|
||||
else {
|
||||
decompile(file)
|
||||
}
|
||||
return decompile(file)
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user