本文整理汇总了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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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();
}
}
示例10: setTooBigFileErrorContents
import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public void setTooBigFileErrorContents() {
setLineBlocks(LineBlocks.EMPTY);
myTopMessageDiffPanel = new CanNotCalculateDiffPanel();
myPanel.insertTopComponent(myTopMessageDiffPanel);
}
示例11: setLineBlocks
import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
private void setLineBlocks(@NotNull LineBlocks blocks) {
myLineBlocks = blocks;
mySplitter.redrawDiffs();
updateStatusBar();
}
示例12: invalidateDiff
import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public void invalidateDiff() {
setLineBlocks(LineBlocks.EMPTY);
myData.removeActions();
}
示例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);
}
示例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);
}
示例15: getLineBlocks
import com.intellij.openapi.diff.impl.splitter.LineBlocks; //导入依赖的package包/类
public LineBlocks getLineBlocks() {
return myMergeList.getChanges(mySide).getLineBlocks();
}