Java 类com.intellij.openapi.util.DifferenceFilter 实例源码

项目:intellij-ce-playground    文件:ReflectionUtil.java   
public static boolean copyFields(@NotNull Field[] fields, @NotNull Object from, @NotNull Object to, @Nullable DifferenceFilter diffFilter) {
  Set<Field> sourceFields = new com.intellij.util.containers.HashSet<Field>(Arrays.asList(from.getClass().getFields()));
  boolean valuesChanged = false;
  for (Field field : fields) {
    if (sourceFields.contains(field)) {
      if (isPublic(field) && !isFinal(field)) {
        try {
          if (diffFilter == null || diffFilter.isAccept(field)) {
            copyFieldValue(from, to, field);
            valuesChanged = true;
          }
        }
        catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
    }
  }
  return valuesChanged;
}
项目:consulo    文件:ReflectionUtil.java   
public static boolean copyFields(@Nonnull Field[] fields, @Nonnull Object from, @Nonnull Object to, @Nullable DifferenceFilter diffFilter) {
  Set<Field> sourceFields = new com.intellij.util.containers.HashSet<Field>(Arrays.asList(from.getClass().getFields()));
  boolean valuesChanged = false;
  for (Field field : fields) {
    if (sourceFields.contains(field)) {
      if (isPublic(field) && !isFinal(field)) {
        try {
          if (diffFilter == null || diffFilter.isAccept(field)) {
            copyFieldValue(from, to, field);
            valuesChanged = true;
          }
        }
        catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
    }
  }
  return valuesChanged;
}
项目:intellij-ce-playground    文件:CustomCodeStyleSettings.java   
public void writeExternal(Element parentElement, @NotNull final CustomCodeStyleSettings parentSettings) throws WriteExternalException {
  final Element childElement = new Element(myTagName);
  DefaultJDOMExternalizer.writeExternal(this, childElement, new DifferenceFilter<CustomCodeStyleSettings>(this, parentSettings));
  if (!childElement.getContent().isEmpty()) {
    parentElement.addContent(childElement);
  }
}
项目:tools-idea    文件:CustomCodeStyleSettings.java   
public void writeExternal(Element parentElement, @NotNull final CustomCodeStyleSettings parentSettings) throws WriteExternalException {
  final Element childElement = new Element(myTagName);
  DefaultJDOMExternalizer.writeExternal(this, childElement, new DifferenceFilter<CustomCodeStyleSettings>(this, parentSettings));
  if (!childElement.getContent().isEmpty()) {
    parentElement.addContent(childElement);
  }
}
项目:consulo    文件:CustomCodeStyleSettings.java   
public void writeExternal(Element parentElement, @Nonnull final CustomCodeStyleSettings parentSettings) throws WriteExternalException {
  final Element childElement = new Element(myTagName);
  DefaultJDOMExternalizer.writeExternal(this, childElement, new DifferenceFilter<CustomCodeStyleSettings>(this, parentSettings));
  if (!childElement.getContent().isEmpty()) {
    parentElement.addContent(childElement);
  }
}
项目:intellij-ce-playground    文件:CodeStyleSettingsManager.java   
private void writeExternal(Element element) throws WriteExternalException {
  DefaultJDOMExternalizer.writeExternal(this, element, new DifferenceFilter<CodeStyleSettingsManager>(this, new CodeStyleSettingsManager()));
}
项目:intellij-ce-playground    文件:LanguageOptions.java   
public void writeExternal(Element element) throws WriteExternalException {
  DefaultJDOMExternalizer.writeExternal(this, element, new DifferenceFilter<LanguageOptions>(this, DEFAULT_SETTINGS_HOLDER));
}
项目:tools-idea    文件:CodeStyleSettingsManager.java   
private void writeExternal(Element element) throws WriteExternalException {
  DefaultJDOMExternalizer.writeExternal(this, element, new DifferenceFilter<CodeStyleSettingsManager>(this, new CodeStyleSettingsManager()));
}
项目:consulo    文件:CodeStyleSettingsManager.java   
private void writeExternal(Element element) throws WriteExternalException {
  DefaultJDOMExternalizer.writeExternal(this, element, new DifferenceFilter<CodeStyleSettingsManager>(this, new CodeStyleSettingsManager()));
}