comparison src/org/tmatesoft/hg/internal/FileAnnotation.java @ 554:a5fd757d1b5d

Access to content of annotated files through BlockData interface
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 21 Feb 2013 21:53:55 +0100
parents ab21ac7dd833
children e623aa2ca526
comparison
equal deleted inserted replaced
553:093a2022dad5 554:a5fd757d1b5d
17 package org.tmatesoft.hg.internal; 17 package org.tmatesoft.hg.internal;
18 18
19 import java.util.LinkedList; 19 import java.util.LinkedList;
20 20
21 import org.tmatesoft.hg.internal.AnnotateFacility.AddBlock; 21 import org.tmatesoft.hg.internal.AnnotateFacility.AddBlock;
22 import org.tmatesoft.hg.internal.AnnotateFacility.BlockData;
22 import org.tmatesoft.hg.internal.AnnotateFacility.ChangeBlock; 23 import org.tmatesoft.hg.internal.AnnotateFacility.ChangeBlock;
23 import org.tmatesoft.hg.internal.AnnotateFacility.DeleteBlock; 24 import org.tmatesoft.hg.internal.AnnotateFacility.DeleteBlock;
24 import org.tmatesoft.hg.internal.AnnotateFacility.EqualBlock; 25 import org.tmatesoft.hg.internal.AnnotateFacility.EqualBlock;
25 import org.tmatesoft.hg.internal.AnnotateFacility.LineInspector; 26 import org.tmatesoft.hg.internal.AnnotateFacility.LineInspector;
26 27
49 50
50 public FileAnnotation(AnnotateFacility.LineInspector lineInspector) { 51 public FileAnnotation(AnnotateFacility.LineInspector lineInspector) {
51 delegate = lineInspector; 52 delegate = lineInspector;
52 } 53 }
53 54
54 public void start(int originLineCount, int targetLineCount) { 55 public void start(BlockData originContent, BlockData targetContent) {
55 if (knownLines == null) { 56 if (knownLines == null) {
56 knownLines = new boolean[targetLineCount]; 57 knownLines = new boolean[targetContent.elementCount()];
57 } 58 }
58 } 59 }
59 60
60 // private static void ppp(IntVector v) { 61 // private static void ppp(IntVector v) {
61 // for (int i = 0; i < v.size(); i+= 3) { 62 // for (int i = 0; i < v.size(); i+= 3) {