com.intellij.openapi.components.Storage Java Examples
The following examples show how to use
com.intellij.openapi.components.Storage.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultStateSerializer.java From consulo with Apache License 2.0 | 5 votes |
@Nullable public static Element serializeState(@Nonnull Object state, @Nullable final Storage storage) throws WriteExternalException { if (state instanceof Element) { return (Element)state; } else if (state instanceof JDOMExternalizable) { Element element = new Element("temp_element"); ((JDOMExternalizable)state).writeExternal(element); return element; } else { return XmlSerializer.serializeIfNotDefault(state, new SkipDefaultValuesSerializationFilters()); } }