use of com.intellij.util.xmlb.SerializationFilter in project intellij-community by JetBrains.
the class XDebuggerBreakpointsContextProvider method saveContext.
@Override
public void saveContext(Element toElement) throws WriteExternalException {
XBreakpointManagerImpl.BreakpointManagerState state = myBreakpointManager.getState();
Element serialize = XmlSerializer.serialize(state, new SerializationFilter() {
@Override
public boolean accepts(@NotNull Accessor accessor, @NotNull Object bean) {
return accessor.read(bean) != null;
}
});
toElement.addContent(serialize.removeContent());
}
use of com.intellij.util.xmlb.SerializationFilter in project intellij-community by JetBrains.
the class XDebuggerWatchesProvider method saveContext.
@Override
public void saveContext(Element toElement) throws WriteExternalException {
XDebuggerWatchesManager.WatchesManagerState state = myWatchesManager.getState();
Element serialize = XmlSerializer.serialize(state, new SerializationFilter() {
@Override
public boolean accepts(@NotNull Accessor accessor, @NotNull Object bean) {
return accessor.read(bean) != null;
}
});
toElement.addContent(serialize.removeContent());
}
use of com.intellij.util.xmlb.SerializationFilter in project intellij-community by JetBrains.
the class PersistableCodeStyleSchemes method getState.
@Nullable
@Override
public Element getState() {
CodeStyleScheme currentScheme = getCurrentScheme();
CURRENT_SCHEME_NAME = currentScheme == null ? null : currentScheme.getName();
return XmlSerializer.serialize(this, new SerializationFilter() {
@Override
public boolean accepts(@NotNull Accessor accessor, @NotNull Object bean) {
if ("CURRENT_SCHEME_NAME".equals(accessor.getName())) {
return !CodeStyleSchemeImpl.DEFAULT_SCHEME_NAME.equals(accessor.read(bean));
} else {
return accessor.getValueClass().equals(String.class);
}
}
});
}
Aggregations