Search in sources :

Example 1 with Attribute

use of com.intellij.util.xmlb.annotations.Attribute 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)1 Attribute (com.intellij.util.xmlb.annotations.Attribute)1 Element (org.jdom.Element)1