use of jadx.gui.utils.CodeUsageInfo in project jadx by skylot.
the class UsageDialog method performSearch.
private synchronized void performSearch() {
resultsModel.clear();
CodeUsageInfo usageInfo = cache.getUsageInfo();
if (usageInfo == null) {
return;
}
resultsModel.addAll(usageInfo.getUsageList(node));
// TODO: highlight only needed node usage
highlightText = null;
resultsTable.updateTable();
}
use of jadx.gui.utils.CodeUsageInfo in project jadx by skylot.
the class IndexJob method runJob.
protected void runJob() {
JNodeCache nodeCache = cache.getNodeCache();
final TextSearchIndex index = new TextSearchIndex(nodeCache);
final CodeUsageInfo usageInfo = new CodeUsageInfo(nodeCache);
cache.setTextIndex(index);
cache.setUsageInfo(usageInfo);
for (final JavaClass cls : wrapper.getClasses()) {
addTask(new Runnable() {
@Override
public void run() {
try {
index.indexNames(cls);
CodeLinesInfo linesInfo = new CodeLinesInfo(cls);
List<StringRef> lines = splitLines(cls);
usageInfo.processClass(cls, linesInfo, lines);
if (Utils.isFreeMemoryAvailable()) {
index.indexCode(cls, linesInfo, lines);
} else {
index.classCodeIndexSkipped(cls);
}
} catch (Exception e) {
LOG.error("Index error in class: {}", cls.getFullName(), e);
}
}
});
}
}
Aggregations