package _VisualDVM.ProjectData.SapforData.Arrays.UI;
import Common.Visual.Menus.GraphMenu;
import Common.Visual.Trees.StyledTree;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;

import javax.swing.*;
public class DistributionMenu extends GraphMenu {
    JMenuItem mChangeDistribution;
    public DistributionMenu(StyledTree tree) {
        super(tree, "области распараллеливания");
        mChangeDistribution = Global.mainModule.getPass(PassCode.SPF_ModifyArrayDistribution).createMenuItem();
        add(mChangeDistribution);
    }
    @Override
    public void CheckElementsVisibility() {
        super.CheckElementsVisibility();
        mChangeDistribution.setVisible(Global.mainModule.getPass(PassCode.SPF_GetArrayDistribution).isDone());
    }
}
