fix(gui): add constructors usage into class usage (#1591)

This commit is contained in:
Skylot
2022-07-30 17:22:32 +01:00
parent d3f6160e62
commit 58a46c6417
@@ -83,6 +83,15 @@ public class UsageDialog extends CommonSearchDialog {
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());