Search in sources :

Example 1 with JpsFlexCompilerOptionsImpl

use of com.intellij.flex.model.bc.impl.JpsFlexCompilerOptionsImpl in project intellij-plugins by JetBrains.

the class JpsFlexProjectLevelCompilerOptionsExtension method saveExtension.

private static void saveExtension(final JpsProject project, final Element componentTag) {
    final JpsFlexProjectLevelCompilerOptionsExtension extension = project.getContainer().getChild(ROLE);
    if (extension != null) {
        final JpsFlexCompilerOptionsImpl compilerOptions = (JpsFlexCompilerOptionsImpl) extension.getProjectLevelCompilerOptions();
        XmlSerializer.serializeInto(compilerOptions.getState(), componentTag);
    }
}
Also used : JpsFlexCompilerOptionsImpl(com.intellij.flex.model.bc.impl.JpsFlexCompilerOptionsImpl)

Example 2 with JpsFlexCompilerOptionsImpl

use of com.intellij.flex.model.bc.impl.JpsFlexCompilerOptionsImpl in project intellij-plugins by JetBrains.

the class JpsFlexProjectLevelCompilerOptionsExtension method loadExtension.

private static void loadExtension(final JpsProject project, final Element componentTag) {
    final JpsFlexProjectLevelCompilerOptionsExtension extension = new JpsFlexProjectLevelCompilerOptionsExtension();
    final JpsFlexCompilerOptionsImpl options = (JpsFlexCompilerOptionsImpl) extension.getProjectLevelCompilerOptions();
    final Attribute annotation = JpsFlexCompilerOptionsImpl.State.class.getAnnotation(Attribute.class);
    final Element compilerOptionsTag = componentTag.getChild(annotation != null ? annotation.value() : "compiler-options");
    if (compilerOptionsTag != null) {
        options.loadState(XmlSerializer.deserialize(compilerOptionsTag, JpsFlexCompilerOptionsImpl.State.class));
    }
    project.getContainer().setChild(ROLE, extension);
}
Also used : Attribute(com.intellij.util.xmlb.annotations.Attribute) Element(org.jdom.Element) JpsFlexCompilerOptionsImpl(com.intellij.flex.model.bc.impl.JpsFlexCompilerOptionsImpl)

Aggregations

JpsFlexCompilerOptionsImpl (com.intellij.flex.model.bc.impl.JpsFlexCompilerOptionsImpl)2 Attribute (com.intellij.util.xmlb.annotations.Attribute)1 Element (org.jdom.Element)1