decompiler: fixed line mapping for try-catch and nested classes

This commit is contained in:
Egor.Ushakov
2014-10-20 18:06:14 +04:00
parent 47fad13908
commit 0bcd7fba5c
8 changed files with 92 additions and 19 deletions

View File

@@ -254,8 +254,11 @@ public class ClassWriter {
if (hasContent) {
buffer.appendLineSeparator();
startLine++;
}
classToJava(inner, buffer, indent + 1, tracer);
BytecodeMappingTracer class_tracer = new BytecodeMappingTracer(startLine);
classToJava(inner, buffer, indent + 1, class_tracer);
startLine = buffer.countLines();
hasContent = true;
}
@@ -840,7 +843,7 @@ public class ClassWriter {
// save total lines
// TODO: optimize
tracer.setCurrentSourceLine(buffer.countLines(start_index_method));
//tracer.setCurrentSourceLine(buffer.countLines(start_index_method));
return !hideMethod;
}