package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Passes.Project.FilesMassPass;
import _VisualDVM.ProjectData.Files.DBProjectFile;
import _VisualDVM.ProjectData.Files.FileType;
public class SetSelectedFilesType extends FilesMassPass<FileType> {
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (super.canStart(args)) {
            target = (FileType) args[0];
            return true;
        }
        return false;
    }
    @Override
    protected void operation(DBProjectFile file) {
        file.UpdateType(target);
        if (Global.mainModule.HasFile() && file.file.equals(Global.mainModule.getFile().file))
            file.form.ShowType();
    }
}
