Java 类com.intellij.util.xmlb.SerializationFilter 实例源码

项目:intellij-ce-playground    文件:PersistableCodeStyleSchemes.java   
@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 !DEFAULT_SCHEME_NAME.equals(accessor.read(bean));
      }
      else {
        return accessor.getValueClass().equals(String.class);
      }
    }
  });
}
项目:intellij-ce-playground    文件:XDebuggerWatchesProvider.java   
@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());
}
项目:intellij-ce-playground    文件:XDebuggerBreakpointsContextProvider.java   
@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());
}
项目:tools-idea    文件:PersistableCodeStyleSchemes.java   
@Nullable
@Override
public Element getState() {
  return XmlSerializer.serialize(this, new SerializationFilter() {
    @Override
    public boolean accepts(Accessor accessor, Object bean) {
      return accessor.getValueClass().equals(String.class);
    }
  });
}
项目:tools-idea    文件:XDebuggerBreakpointsContextProvider.java   
@Override
public void saveContext(Element toElement) throws WriteExternalException {
  XBreakpointManagerImpl.BreakpointManagerState state = myBreakpointManager.getState();
  Element serialize = XmlSerializer.serialize(state, new SerializationFilter() {
    @Override
    public boolean accepts(Accessor accessor, Object bean) {
      return accessor.read(bean) != null;
    }
  });
  toElement.addContent(serialize.removeContent());
}
项目:consulo-tasks    文件:XDebuggerBreakpointsContextProvider.java   
@Override
public void saveContext(Element toElement) throws WriteExternalException {
  XBreakpointManagerImpl.BreakpointManagerState state = myBreakpointManager.getState();
  Element serialize = XmlSerializer.serialize(state, new SerializationFilter() {
    @Override
    public boolean accepts(Accessor accessor, Object bean) {
      return accessor.read(bean) != null;
    }
  });
  toElement.addContent(serialize.removeContent());
}
项目:consulo    文件:PersistableCodeStyleSchemes.java   
@Nullable
@Override
public Element getState() {
  return XmlSerializer.serialize(this, new SerializationFilter() {
    @Override
    public boolean accepts(@Nonnull Accessor accessor, Object bean) {
      return accessor.getValueClass().equals(String.class);
    }
  });
}
项目:intellij-ce-playground    文件:InspectionProfileEntry.java   
/**
 * Returns filter used to omit default values on saving inspection settings.
 * Default implementation uses SkipDefaultValuesSerializationFilters.
 *
 * @return serialization filter.
 */
@SuppressWarnings("MethodMayBeStatic")
@Nullable
protected SerializationFilter getSerializationFilter() {
  return DEFAULT_FILTER;
}
项目:tools-idea    文件:InspectionProfileEntry.java   
/**
 * Returns filter used to omit default values on saving inspection settings.
 * Default implementation uses SkipDefaultValuesSerializationFilters.
 *
 * @return serialization filter.
 */
@SuppressWarnings("MethodMayBeStatic")
@Nullable
protected SerializationFilter getSerializationFilter() {
  return DEFAULT_FILTER;
}
项目:consulo    文件:InspectionProfileEntry.java   
/**
 * Returns filter used to omit default values on saving inspection settings.
 * Default implementation uses SkipDefaultValuesSerializationFilters.
 *
 * @return serialization filter.
 */
@SuppressWarnings("MethodMayBeStatic")
@Nullable
protected SerializationFilter getSerializationFilter() {
  return DEFAULT_FILTER;
}