@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; }
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); }
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); }
@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; }
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); }
private ConvertFromTokensToASTBuilder(@NotNull StartMarker rootNode, @NotNull DiffTreeChangeBuilder<ASTNode, ASTNode> delegate) { myDelegate = delegate; myConverter = new ASTConverter(rootNode); }
public ConvertFromTokensToASTBuilder(StartMarker rootNode, DiffTreeChangeBuilder<ASTNode, ASTNode> delegate) { myDelegate = delegate; myConverter = new ASTConverter(rootNode); }
private ConvertFromTokensToASTBuilder(@Nonnull StartMarker rootNode, @Nonnull DiffTreeChangeBuilder<ASTNode, ASTNode> delegate) { myDelegate = delegate; myConverter = new ASTConverter(rootNode); }