Search in sources :

Example 1 with JRoot

use of jadx.gui.treemodel.JRoot in project jadx by skylot.

the class QuarkManager method loadReport.

private void loadReport() {
    try {
        QuarkReportNode quarkNode = new QuarkReportNode(reportFile);
        JRoot root = mainWindow.getCacheObject().getJRoot();
        root.replaceCustomNode(quarkNode);
        root.update();
        mainWindow.reloadTree();
        mainWindow.getTabbedPane().showNode(quarkNode);
    } catch (Exception e) {
        UiUtils.errorMessage(mainWindow, "Failed to load Quark report.");
        LOG.error("Failed to load Quark report.", e);
    }
}
Also used : JRoot(jadx.gui.treemodel.JRoot) JadxRuntimeException(jadx.core.utils.exceptions.JadxRuntimeException)

Example 2 with JRoot

use of jadx.gui.treemodel.JRoot in project jadx by skylot.

the class MainWindow method initTree.

public void initTree() {
    treeRoot = new JRoot(wrapper);
    cacheObject.setJRoot(treeRoot);
    treeRoot.setFlatPackages(isFlattenPackage);
    treeModel.setRoot(treeRoot);
    addTreeCustomNodes();
    treeRoot.update();
    reloadTree();
    cacheObject.setJadxSettings(settings);
}
Also used : JRoot(jadx.gui.treemodel.JRoot)

Example 3 with JRoot

use of jadx.gui.treemodel.JRoot in project jadx by skylot.

the class MainWindow method setFlattenPackage.

private void setFlattenPackage(boolean value) {
    isFlattenPackage = value;
    settings.setFlattenPackage(isFlattenPackage);
    flatPkgButton.setSelected(isFlattenPackage);
    flatPkgMenuItem.setState(isFlattenPackage);
    Object root = treeModel.getRoot();
    if (root instanceof JRoot) {
        JRoot treeRoot = (JRoot) root;
        treeRoot.setFlatPackages(isFlattenPackage);
        reloadTree();
    }
}
Also used : JRoot(jadx.gui.treemodel.JRoot) CacheObject(jadx.gui.utils.CacheObject)

Aggregations

JRoot (jadx.gui.treemodel.JRoot)3 JadxRuntimeException (jadx.core.utils.exceptions.JadxRuntimeException)1 CacheObject (jadx.gui.utils.CacheObject)1