Search in sources :

Example 6 with SkipDefaultValuesSerializationFilters

use of com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters in project intellij-plugins by JetBrains.

the class DartRunConfigurationBase method writeExternal.

@Override
public void writeExternal(final Element element) throws WriteExternalException {
    super.writeExternal(element);
    XmlSerializer.serializeInto(getRunnerParameters(), element, new SkipDefaultValuesSerializationFilters());
}
Also used : SkipDefaultValuesSerializationFilters(com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters)

Example 7 with SkipDefaultValuesSerializationFilters

use of com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters in project intellij-community by JetBrains.

the class FacetUtil method saveFacetConfiguration.

public static Element saveFacetConfiguration(final FacetConfiguration configuration) throws WriteExternalException {
    if (configuration instanceof PersistentStateComponent) {
        Object state = ((PersistentStateComponent) configuration).getState();
        if (state instanceof Element)
            return ((Element) state);
        return XmlSerializer.serialize(state, new SkipDefaultValuesSerializationFilters());
    } else {
        final Element config = new Element(JpsFacetSerializer.CONFIGURATION_TAG);
        configuration.writeExternal(config);
        return config;
    }
}
Also used : PersistentStateComponent(com.intellij.openapi.components.PersistentStateComponent) SkipDefaultValuesSerializationFilters(com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters) Element(org.jdom.Element)

Example 8 with SkipDefaultValuesSerializationFilters

use of com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters in project intellij-community by JetBrains.

the class RunnerLayout method write.

@NotNull
public Element write(@NotNull Element parentNode) {
    for (ViewImpl eachState : myViews.values()) {
        if (myLightWeightIds != null && myLightWeightIds.contains(eachState.getID())) {
            continue;
        }
        parentNode.addContent(XmlSerializer.serialize(eachState));
    }
    SkipDefaultValuesSerializationFilters filter = new SkipDefaultValuesSerializationFilters();
    for (TabImpl eachTab : myTabs) {
        if (isUsed(eachTab)) {
            parentNode.addContent(XmlSerializer.serialize(eachTab, filter));
        }
    }
    parentNode.addContent(XmlSerializer.serialize(myGeneral, filter));
    return parentNode;
}
Also used : SkipDefaultValuesSerializationFilters(com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters) NotNull(org.jetbrains.annotations.NotNull)

Example 9 with SkipDefaultValuesSerializationFilters

use of com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters in project intellij-plugins by JetBrains.

the class DartRemoteDebugConfiguration method writeExternal.

@Override
public void writeExternal(final Element element) throws WriteExternalException {
    super.writeExternal(element);
    XmlSerializer.serializeInto(myParameters, element, new SkipDefaultValuesSerializationFilters());
}
Also used : SkipDefaultValuesSerializationFilters(com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters)

Example 10 with SkipDefaultValuesSerializationFilters

use of com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters in project intellij-plugins by JetBrains.

the class BndRunConfigurationBase method writeExternal.

@Override
public void writeExternal(Element element) throws WriteExternalException {
    super.writeExternal(element);
    RunConfiguration template = getFactory().createTemplateConfiguration(getProject());
    XmlSerializer.serializeInto(this, element, new SkipDefaultValuesSerializationFilters(template));
}
Also used : SkipDefaultValuesSerializationFilters(com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters)

Aggregations

SkipDefaultValuesSerializationFilters (com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters)15 Element (org.jdom.Element)10 PersistentStateComponent (com.intellij.openapi.components.PersistentStateComponent)1 Accessor (com.intellij.util.xmlb.Accessor)1 XExpression (com.intellij.xdebugger.XExpression)1 XExpressionState (com.intellij.xdebugger.impl.breakpoints.XExpressionState)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1 ProcessorConfigProfile (org.jetbrains.jps.model.java.compiler.ProcessorConfigProfile)1 JpsModelSerializerExtension (org.jetbrains.jps.model.serialization.JpsModelSerializerExtension)1 ArtifactPropertiesState (org.jetbrains.jps.model.serialization.artifact.ArtifactPropertiesState)1