package com.intellij.execution;

import org.jdom.Element;

/**
 * @author Eugene Zhuravlev
 *         Date: May 18, 2009
 */
public abstract class BeforeRunTask implements Cloneable{
  private boolean myIsEnabled;

  public boolean isEnabled() {
    return myIsEnabled;
  }

  public void setEnabled(boolean isEnabled) {
    myIsEnabled = isEnabled;
  }

  public void writeExternal(Element element) {
    element.setAttribute("enabled", String.valueOf(myIsEnabled));
  }
  
  public void readExternal(Element element) {
    myIsEnabled = Boolean.valueOf(element.getAttributeValue("enabled")).booleanValue();
  }

  public BeforeRunTask clone() {
    try {
      return (BeforeRunTask)super.clone();
    }
    catch (CloneNotSupportedException ignored) {
      return null;
    }
  }
}

@@ -522,74 +522,247 @@
     
-myIsEnabled = Boolean.valueOf(element.getAttributeValue(%22enabled%22)
+String attribValue = element.getAttributeValue(%22enabled%22);%0A    if (attribValue == null) %7B%0A      attribValue = element.getAttributeValue(%22value%22); // maintain compatibility with old format%0A    %7D%0A    myIsEnabled = Boolean.valueOf(attribValue
 ).bo

fix problem with setting all options "Make before run" to false