当前位置: 首页>>代码示例>>Java>>正文


Java LineBlocks类代码示例

本文整理汇总了Java中com.intellij.openapi.diff.impl.splitter.LineBlocks的典型用法代码示例。如果您正苦于以下问题:Java LineBlocks类的具体用法?Java LineBlocks怎么用?Java LineBlocks使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LineBlocks类属于com.intellij.openapi.diff.impl.splitter包,在下文中一共展示了LineBlocks类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: rediff

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
void rediff() {
  try {
    if (myTopMessageDiffPanel != null) {
      myPanel.removeTopComponent(myTopMessageDiffPanel);
    }
    LineBlocks blocks = myData.updateEditors();
    setLineBlocks(blocks != null ? blocks : LineBlocks.EMPTY);
    if (blocks != null && blocks.getCount() == 0) {
      if (myData.isContentsEqual()) {
        setFileContentsAreIdentical();
      }
    }
  }
  catch (FilesTooBigForDiffException e) {
    setTooBigFileErrorContents();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:DiffPanelImpl.java

示例2: addMarkup

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private LineBlocks addMarkup(final List<LineFragment> lines) {
  myFragmentHighlighter.precalculateNumbers(lines);

  for (Iterator<LineFragment> iterator = lines.iterator(); iterator.hasNext(); ) {
    LineFragment line = iterator.next();
    myFragmentHighlighter.setIsLast(!iterator.hasNext());
    line.highlight(myFragmentHighlighter);
  }
  ArrayList<LineFragment> allLineFragments = new ArrayList<LineFragment>();
  for (LineFragment lineFragment : lines) {
    allLineFragments.add(lineFragment);
    lineFragment.addAllDescendantsTo(allLineFragments);
  }
  myFragmentList = FragmentListImpl.fromList(allLineFragments);
  return LineBlocks.fromLineFragments(allLineFragments);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:FragmentedDiffPanelState.java

示例3: addMarkup

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private LineBlocks addMarkup(final List<LineFragment> lines) {
  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    public void run() {
      final FragmentHighlighterImpl fragmentHighlighter = new FragmentHighlighterImpl(myAppender1, myAppender2);
      for (Iterator<LineFragment> iterator = lines.iterator(); iterator.hasNext();) {
        LineFragment line = iterator.next();
        fragmentHighlighter.setIsLast(!iterator.hasNext());
        line.highlight(fragmentHighlighter);
      }
    }
  });
  ArrayList<LineFragment> allLineFragments = new ArrayList<LineFragment>();
  for (LineFragment lineFragment : lines) {
    allLineFragments.add(lineFragment);
    lineFragment.addAllDescendantsTo(allLineFragments);
  }
  myFragmentList = FragmentListImpl.fromList(allLineFragments);
  return LineBlocks.fromLineFragments(allLineFragments);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:SimpleDiffPanelState.java

示例4: addMarkup

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private LineBlocks addMarkup(final List<LineFragment> lines) {
  myFragmentHighlighter.precalculateNumbers(lines);

  for (Iterator<LineFragment> iterator = lines.iterator(); iterator.hasNext();) {
    LineFragment line = iterator.next();
    myFragmentHighlighter.setIsLast(!iterator.hasNext());
    line.highlight(myFragmentHighlighter);
  }
  ArrayList<LineFragment> allLineFragments = new ArrayList<LineFragment>();
  for (LineFragment lineFragment : lines) {
    allLineFragments.add(lineFragment);
    lineFragment.addAllDescendantsTo(allLineFragments);
  }
  myFragmentList = FragmentListImpl.fromList(allLineFragments);
  return LineBlocks.fromLineFragments(allLineFragments);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:FragmentedDiffPanelState.java

示例5: addMarkup

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private LineBlocks addMarkup(final ArrayList<LineFragment> lines) {
  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    public void run() {
      final FragmentHighlighterImpl fragmentHighlighter = new FragmentHighlighterImpl(myAppender1, myAppender2);
      for (Iterator<LineFragment> iterator = lines.iterator(); iterator.hasNext();) {
        LineFragment line = iterator.next();
        fragmentHighlighter.setIsLast(!iterator.hasNext());
        line.highlight(fragmentHighlighter);
      }
    }
  });
  ArrayList<LineFragment> allLineFragments = new ArrayList<LineFragment>();
  for (LineFragment lineFragment : lines) {
    allLineFragments.add(lineFragment);
    lineFragment.addAllDescendantsTo(allLineFragments);
  }
  myFragmentList = FragmentListImpl.fromList(allLineFragments);
  return LineBlocks.fromLineFragments(allLineFragments);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:SimpleDiffPanelState.java

示例6: updateEditors

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
@Nullable
public LineBlocks updateEditors() throws FilesTooBigForDiffException {
  resetMarkup();
  if (myAppender1.getEditor() == null || myAppender2.getEditor() == null) {
    return null;
  }

  return addMarkup(
    new TextCompareProcessor(myComparisonPolicy, myDiffPolicy, myHighlightMode).process(myAppender1.getText(), myAppender2.getText()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SimpleDiffPanelState.java

示例7: updateEditors

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public LineBlocks updateEditors() throws FilesTooBigForDiffException {
  resetMarkup();
  if (myAppender1.getEditor() == null || myAppender2.getEditor() == null) {
    return LineBlocks.EMPTY;
  }

  return addMarkup(new TextCompareProcessor(myComparisonPolicy, myDiffPolicy).process(myAppender1.getText(), myAppender2.getText()));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:SimpleDiffPanelState.java

示例8: updateEditors

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
@Nullable
public LineBlocks updateEditors() throws FilesTooBigForDiffException {
  resetMarkup();
  if (myAppender1.getEditor() == null || myAppender2.getEditor() == null) {
    return null;
  }

  return addMarkup(
          new TextCompareProcessor(myComparisonPolicy, myDiffPolicy, myHighlightMode).process(myAppender1.getText(), myAppender2.getText()));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:SimpleDiffPanelState.java

示例9: getLineBlocks

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
@Override
public LineBlocks getLineBlocks() {
  if (myAppliedLineBlocks) {
    return myMergeList.getChanges(mySide).getAllLineBlocks();
  } else {
    return myMergeList.getChanges(mySide).getLineBlocks();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:MergePanel2.java

示例10: setTooBigFileErrorContents

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public void setTooBigFileErrorContents() {
  setLineBlocks(LineBlocks.EMPTY);
  myTopMessageDiffPanel = new CanNotCalculateDiffPanel();
  myPanel.insertTopComponent(myTopMessageDiffPanel);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DiffPanelImpl.java

示例11: setLineBlocks

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private void setLineBlocks(@NotNull LineBlocks blocks) {
  myLineBlocks = blocks;
  mySplitter.redrawDiffs();
  updateStatusBar();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DiffPanelImpl.java

示例12: invalidateDiff

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public void invalidateDiff() {
  setLineBlocks(LineBlocks.EMPTY);
  myData.removeActions();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DiffPanelImpl.java

示例13: getNonAppliedLineBlocks

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public LineBlocks getNonAppliedLineBlocks() {
  ArrayList<Change> changes = new ArrayList<Change>(myChanges);
  return LineBlocks.fromChanges(changes);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ChangeList.java

示例14: getLineBlocks

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public LineBlocks getLineBlocks() {
  ArrayList<Change> changes = new ArrayList<Change>(myChanges);
  changes.addAll(myAppliedChanges);
  return LineBlocks.fromChanges(changes);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ChangeList.java

示例15: getLineBlocks

import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public LineBlocks getLineBlocks() {
  return myMergeList.getChanges(mySide).getLineBlocks();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:MergePanel2.java


注:本文中的com.intellij.openapi.diff.impl.splitter.LineBlocks类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。