public void windowGainedFocus(WindowEvent e) {
try {
final Type deployOrNot = new Type("Select forms to deploy");
final Instance deployInstance = deployOrNot.createInstance();
new ForLoop(){
public void logic(Object target) {
OpenedForm openedForm = (OpenedForm) target;
File file = new File(openedForm.localFilePath);
if(openedForm.lastModified != file.lastModified()){
deployOrNot.addFieldDescriptor(new FieldDescriptor(openedForm.formName, Boolean.class, null, null));
deployInstance.setFieldValue(openedForm.formName, true);
openedForm.lastModified = file.lastModified();
}
}
}.run(openedForms);