package _VisualDVM.ProjectData.SapforData.Functions.UI;
import Common.Visual.Trees.SelectableTree;
import _VisualDVM.ProjectData.SapforData.Functions.FuncCallH;
import _VisualDVM.Visual.Menus.SelectionTreeMenu;

import javax.swing.tree.DefaultMutableTreeNode;
public class InlineMenu2 extends SelectionTreeMenu {
    public InlineMenu2(SelectableTree tree_in) {
        super(tree_in);
    }
    @Override
    public Class getTargetClass() {
        return FuncCallH.class;
    }
    @Override
    public void SelectAll(boolean select) {
        if (tree.root.getChildCount() == 1)
            SelectR(
                    (FuncCallH) ((DefaultMutableTreeNode) (tree.root.getChildAt(0))).getUserObject(),
                    select);
    }
    public void SelectR(FuncCallH callH, boolean select) {
        callH.Select(select);
        for (FuncCallH child : callH.calls)
            SelectR(child, select);
    }
}
