use of org.jetbrains.jps.model.serialization.module.JpsModulePropertiesSerializer in project intellij-plugins by JetBrains.
the class JpsFlexModuleType method createModulePropertiesSerializer.
public static JpsModulePropertiesSerializer<JpsFlexBuildConfigurationManager> createModulePropertiesSerializer() {
return new JpsModulePropertiesSerializer<JpsFlexBuildConfigurationManager>(INSTANCE, ID, "FlexBuildConfigurationManager") {
@Override
public JpsFlexBuildConfigurationManager loadProperties(@Nullable final Element componentElement) {
final JpsFlexBuildConfigurationManagerImpl manager = new JpsFlexBuildConfigurationManagerImpl();
manager.loadState(XmlSerializer.deserialize(componentElement, JpsFlexBuildConfigurationManagerImpl.State.class));
return manager;
}
@Override
public void saveProperties(@NotNull final JpsFlexBuildConfigurationManager manager, @NotNull final Element componentElement) {
final JpsFlexBuildConfigurationManagerImpl.State state = ((JpsFlexBuildConfigurationManagerImpl) manager).getState();
XmlSerializer.serializeInto(state, componentElement);
}
};
}
Aggregations