Java 类com.intellij.util.containers.CacheOneStepIterator 实例源码

项目:intellij-ce-playground    文件:ShowDiffFromAnnotation.java   
private DiffNavigationContext createDiffNavigationContext(final int actualLine) {
  final ContentsLines contentsLines = new ContentsLines(myFileAnnotation.getAnnotatedContent());

  final Pair<Integer, String> pair = correctActualLineIfTextEmpty(contentsLines, actualLine);
  return new DiffNavigationContext(new Iterable<String>() {
    @Override
    public Iterator<String> iterator() {
      return new CacheOneStepIterator<String>(new ContextLineIterator(contentsLines, myFileAnnotation, pair.getFirst()));
    }
  }, pair.getSecond());
}
项目:tools-idea    文件:ShowDiffFromAnnotation.java   
private DiffNavigationContext createDiffNavigationContext(final int actualLine) {
  final ContentsLines contentsLines = new ContentsLines(myFileAnnotation.getAnnotatedContent());

  final Pair<Integer, String> pair = correctActualLineIfTextEmpty(contentsLines, actualLine);
  return new DiffNavigationContext(new Iterable<String>() {
    @Override
    public Iterator<String> iterator() {
      return new CacheOneStepIterator<String>(new ContextLineIterator(contentsLines, myFileAnnotation, pair.getFirst()));
    }
  }, pair.getSecond());
}
项目:consulo    文件:ShowDiffFromAnnotation.java   
private DiffNavigationContext createDiffNavigationContext(final int actualLine) {
  final ContentsLines contentsLines = new ContentsLines(myFileAnnotation.getAnnotatedContent());

  final Pair<Integer, String> pair = correctActualLineIfTextEmpty(contentsLines, actualLine);
  return new DiffNavigationContext(new Iterable<String>() {
    @Override
    public Iterator<String> iterator() {
      return new CacheOneStepIterator<String>(new ContextLineIterator(contentsLines, myFileAnnotation, pair.getFirst()));
    }
  }, pair.getSecond());
}