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