fix: improve usage search, refactor java nodes creation (#1489)

This commit is contained in:
Skylot
2022-05-27 17:56:08 +01:00
parent 1df217c4a0
commit cb741db623
11 changed files with 132 additions and 162 deletions
@@ -20,7 +20,6 @@ import jadx.api.JadxDecompiler;
import jadx.api.JavaClass;
import jadx.api.JavaNode;
import jadx.api.metadata.ICodeAnnotation;
import jadx.core.dex.nodes.ClassNode;
import jadx.gui.settings.JadxProject;
import jadx.gui.treemodel.JClass;
import jadx.gui.treemodel.JNode;
@@ -244,8 +243,8 @@ public final class CodeArea extends AbstractCodeArea {
ICodeInfo codeInfo = getCodeInfo();
if (codeInfo.hasMetadata()) {
ICodeAnnotation ann = codeInfo.getCodeMetadata().getAt(pos);
if (ann instanceof ClassNode) {
return getDecompiler().getJavaClassByNode(((ClassNode) ann));
if (ann != null && ann.getAnnType() == ICodeAnnotation.AnnType.CLASS) {
return (JavaClass) getDecompiler().getJavaNodeByCodeAnnotation(codeInfo, ann);
}
}
} catch (Exception e) {