Skip to content

Commit

Permalink
fix(gui): add constructors usage into class usage (#1591)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jul 30, 2022
1 parent d3f6160 commit 58a46c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jadx-gui/src/main/java/jadx/gui/ui/dialog/UsageDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ private Map<JavaNode, List<JavaNode>> buildUsageQuery() {
for (JavaMethod mth : getMethodWithOverrides(javaMethod)) {
map.put(mth, mth.getUseIn());
}
} else if (node instanceof JClass) {
JavaClass javaCls = ((JClass) node).getCls();
map.put(javaCls, javaCls.getUseIn());
// add constructors usage into class usage
for (JavaMethod javaMth : javaCls.getMethods()) {
if (javaMth.isConstructor()) {
map.put(javaMth, javaMth.getUseIn());
}
}
} else {
JavaNode javaNode = node.getJavaNode();
map.put(javaNode, javaNode.getUseIn());
Expand Down

0 comments on commit 58a46c6

Please sign in to comment.