use of jadx.gui.ui.MainWindow in project jadx by skylot.
the class QuarkReportPanel method resolveMethod.
public MutableTreeNode resolveMethod(String descr) {
try {
String[] parts = removeQuotes(descr).split(" ", 3);
String cls = Utils.cleanObjectName(parts[0].replace('$', '.'));
String mth = parts[1] + parts[2].replace(" ", "");
MainWindow mainWindow = getTabbedPane().getMainWindow();
JadxWrapper wrapper = mainWindow.getWrapper();
JavaClass javaClass = wrapper.searchJavaClassByRawName(cls);
if (javaClass == null) {
return new TextTreeNode(cls + "." + mth);
}
JavaMethod javaMethod = javaClass.searchMethodByShortId(mth);
if (javaMethod == null) {
return new TextTreeNode(javaClass.getFullName() + "." + mth);
}
return new MethodTreeNode(javaMethod);
} catch (Exception e) {
LOG.error("Failed to parse method descriptor string", e);
return new TextTreeNode(descr);
}
}
use of jadx.gui.ui.MainWindow in project jadx by skylot.
the class QuarkManager method start.
public void start() {
if (!checkFileSize(LARGE_APK_SIZE)) {
int result = JOptionPane.showConfirmDialog(mainWindow, "The selected file size is too large (over 30M) that may take a long time to analyze, do you want to continue", "Quark: Warning", JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.NO_OPTION) {
return;
}
}
BackgroundExecutor executor = mainWindow.getBackgroundExecutor();
executor.execute("Quark install", this::checkInstall, installStatus -> executor.execute("Quark analysis", this::startAnalysis, analysisStatus -> loadReport()));
}
use of jadx.gui.ui.MainWindow in project jadx by skylot.
the class JadxGUI method main.
public static void main(String[] args) {
try {
LogCollector.register();
JadxSettings settings = JadxSettingsAdapter.load();
settings.setLogLevel(LogHelper.LogLevelEnum.INFO);
// overwrite loaded settings by command line arguments
if (!settings.overrideProvided(args)) {
return;
}
printSystemInfo();
LafManager.init(settings);
NLS.setLocale(settings.getLangLocale());
SwingUtilities.invokeLater(new MainWindow(settings)::init);
} catch (Exception e) {
LOG.error("Error: {}", e.getMessage(), e);
System.exit(1);
}
}
Aggregations