package _VisualDVM.Passes.All;
import Common.Passes.Pass;
import _VisualDVM.Current;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.ProjectData.Project.db_project_info;

import java.util.Vector;
public class DeleteLonelyM extends Pass<db_project_info> {
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (Global.mainModule.Check(Log, Current.Root)) {
            target = Global.mainModule.getRoot();
            return true;
        }
        return false;
    }
    @Override
    protected void body() throws Exception {
        Vector<db_project_info> targets = target.getLonelyM();
        for (db_project_info m : targets) {
            Global.mainModule.getPass(PassCode.DeleteVersion).Do(m);
        }
    }
}
