mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java-decompiler: better diagnostic
This commit is contained in:
+2
-1
@@ -61,6 +61,7 @@ public class ClassWrapper {
|
||||
}
|
||||
|
||||
int maxSec = Integer.parseInt(DecompilerContext.getProperty(IFernflowerPreferences.MAX_PROCESSING_METHOD).toString());
|
||||
boolean testMode = DecompilerContext.getOption(IFernflowerPreferences.UNIT_TEST_MODE);
|
||||
|
||||
for (StructMethod mt : classStruct.getMethods()) {
|
||||
DecompilerContext.getLogger().startMethod(mt.getName() + " " + mt.getDescriptor());
|
||||
@@ -83,7 +84,7 @@ public class ClassWrapper {
|
||||
|
||||
try {
|
||||
if (mt.containsCode()) {
|
||||
if (maxSec == 0) {
|
||||
if (maxSec == 0 || testMode) {
|
||||
root = MethodProcessorRunnable.codeToJava(mt, varProc);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -109,6 +109,10 @@ public class IdeaDecompiler extends ClassFileDecompilers.Light {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (app.isUnitTestMode()) {
|
||||
myOptions.put(IFernflowerPreferences.UNIT_TEST_MODE, "1");
|
||||
}
|
||||
}
|
||||
|
||||
private void showLegalNotice(final Project project, final VirtualFile file) {
|
||||
|
||||
@@ -44,7 +44,8 @@ public class IdeaLogger extends IFernflowerLogger {
|
||||
if (t instanceof InternalException) throw (InternalException)t;
|
||||
else if (t instanceof ProcessCanceledException) throw (ProcessCanceledException)t;
|
||||
else if (t instanceof InterruptedException) throw new ProcessCanceledException(t);
|
||||
else throw new InternalException(message, t);
|
||||
if (myClass != null) message = message + " [" + myClass + "]";
|
||||
throw new InternalException(message, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user