package jetbrains.mps.ant.execution; /*Generated by MPS */ import jetbrains.mps.execution.api.settings.IPersistentConfiguration; import org.apache.log4j.Logger; import org.apache.log4j.LogManager; import org.jetbrains.annotations.NotNull; import jetbrains.mps.execution.api.settings.PersistentConfigurationContext; import com.intellij.execution.configurations.RuntimeConfigurationException; import org.jdom.Element; import com.intellij.openapi.util.WriteExternalException; import com.intellij.util.xmlb.XmlSerializer; import com.intellij.openapi.util.InvalidDataException; import org.apache.log4j.Level; public class AntSettings_Configuration implements IPersistentConfiguration { private static final Logger LOG = LogManager.getLogger(AntSettings_Configuration.class); @NotNull private AntSettings_Configuration.MyState myState = new AntSettings_Configuration.MyState(); public void checkConfiguration(final PersistentConfigurationContext context) throws RuntimeConfigurationException { } @Override public void writeExternal(Element element) throws WriteExternalException { element.addContent(XmlSerializer.serialize(myState)); } @Override public void readExternal(Element element) throws InvalidDataException { if (element == null) { throw new InvalidDataException("Cant read " + this + ": element is null."); } XmlSerializer.deserializeInto(myState, (Element) element.getChildren().get(0)); } public boolean getUseOtherAntLocation() { return myState.myUseOtherAntLocation; } public String getOtherAntLocation() { return myState.myOtherAntLocation; } public String getAntOptions() { return myState.myAntOptions; } public void setUseOtherAntLocation(boolean value) { myState.myUseOtherAntLocation = value; } public void setOtherAntLocation(String value) { myState.myOtherAntLocation = value; } public void setAntOptions(String value) { myState.myAntOptions = value; } @Override public AntSettings_Configuration clone() { AntSettings_Configuration clone = null; try { clone = createCloneTemplate(); clone.myState = (AntSettings_Configuration.MyState) myState.clone(); return clone; } catch (CloneNotSupportedException ex) { if (LOG.isEnabledFor(Level.ERROR)) { LOG.error("", ex); } } return clone; } public class MyState { public boolean myUseOtherAntLocation; public String myOtherAntLocation; public String myAntOptions; public MyState() { } @Override public Object clone() throws CloneNotSupportedException { AntSettings_Configuration.MyState state = new AntSettings_Configuration.MyState(); state.myUseOtherAntLocation = myUseOtherAntLocation; state.myOtherAntLocation = myOtherAntLocation; state.myAntOptions = myAntOptions; return state; } } public AntSettings_Configuration() { } public AntSettings_Configuration createCloneTemplate() { return new AntSettings_Configuration(); } public AntSettings_Configuration_Editor getEditor() { return new AntSettings_Configuration_Editor(); } }