Java 类com.intellij.util.diff.ShallowNodeComparator 实例源码

项目:intellij-ce-playground    文件:PsiBuilderImpl.java   
@NotNull
private DiffLog merge(@NotNull final ASTNode oldRoot, @NotNull StartMarker newRoot, @NotNull CharSequence lastCommittedText) {
  DiffLog diffLog = new DiffLog();
  DiffTreeChangeBuilder<ASTNode, LighterASTNode> builder = new ConvertFromTokensToASTBuilder(newRoot, diffLog);
  MyTreeStructure treeStructure = new MyTreeStructure(newRoot, null);
  ShallowNodeComparator<ASTNode, LighterASTNode> comparator = new MyComparator(getUserDataUnprotected(CUSTOM_COMPARATOR), treeStructure);

  ProgressIndicator indicator = ProgressIndicatorProvider.getGlobalProgressIndicator();
  BlockSupportImpl.diffTrees(oldRoot, builder, comparator, treeStructure, indicator == null ? new EmptyProgressIndicator() : indicator,
                             lastCommittedText);
  return diffLog;
}
项目:intellij-ce-playground    文件:BlockSupportImpl.java   
public static <T> void diffTrees(@NotNull final ASTNode oldRoot,
                                 @NotNull final DiffTreeChangeBuilder<ASTNode, T> builder,
                                 @NotNull final ShallowNodeComparator<ASTNode, T> comparator,
                                 @NotNull final FlyweightCapableTreeStructure<T> newTreeStructure,
                                 @NotNull ProgressIndicator indicator,
                                 @NotNull CharSequence lastCommittedText) {
  TreeUtil.ensureParsedRecursivelyCheckingProgress(oldRoot, indicator);
  DiffTree.diff(createInterruptibleASTStructure(oldRoot, indicator), newTreeStructure, comparator, builder, lastCommittedText);
}
项目:tools-idea    文件:BlockSupportImpl.java   
public static <T> void diffTrees(@NotNull final ASTNode oldRoot,
                                 @NotNull final DiffTreeChangeBuilder<ASTNode, T> builder,
                                 @NotNull final ShallowNodeComparator<ASTNode, T> comparator,
                                 @NotNull final FlyweightCapableTreeStructure<T> newTreeStructure,
                                 final ProgressIndicator indicator) {
  TreeUtil.ensureParsedRecursivelyCheckingProgress(oldRoot, indicator);
  DiffTree.diff(createInterruptibleASTStructure(oldRoot, indicator), newTreeStructure, comparator, builder);
}
项目:consulo    文件:PsiBuilderImpl.java   
@Nonnull
private DiffLog merge(@Nonnull final ASTNode oldRoot, @Nonnull StartMarker newRoot, @Nonnull CharSequence lastCommittedText) {
  DiffLog diffLog = new DiffLog();
  DiffTreeChangeBuilder<ASTNode, LighterASTNode> builder = new ConvertFromTokensToASTBuilder(newRoot, diffLog);
  MyTreeStructure treeStructure = new MyTreeStructure(newRoot, null);
  ShallowNodeComparator<ASTNode, LighterASTNode> comparator = new MyComparator(getUserDataUnprotected(CUSTOM_COMPARATOR), treeStructure);

  ProgressIndicator indicator = ProgressIndicatorProvider.getGlobalProgressIndicator();
  BlockSupportImpl.diffTrees(oldRoot, builder, comparator, treeStructure, indicator == null ? new EmptyProgressIndicator() : indicator, lastCommittedText);
  return diffLog;
}
项目:consulo    文件:BlockSupportImpl.java   
public static <T> void diffTrees(@Nonnull final ASTNode oldRoot,
                                 @Nonnull final DiffTreeChangeBuilder<ASTNode, T> builder,
                                 @Nonnull final ShallowNodeComparator<ASTNode, T> comparator,
                                 @Nonnull final FlyweightCapableTreeStructure<T> newTreeStructure,
                                 @Nonnull ProgressIndicator indicator,
                                 @Nonnull CharSequence lastCommittedText) {
  TreeUtil.ensureParsedRecursivelyCheckingProgress(oldRoot, indicator);
  DiffTree.diff(createInterruptibleASTStructure(oldRoot, indicator), newTreeStructure, comparator, builder, lastCommittedText);
}