本文整理汇总了Java中com.intellij.openapi.diff.impl.incrementalMerge.Change类的典型用法代码示例。如果您正苦于以下问题:Java Change类的具体用法?Java Change怎么用?Java Change使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Change类属于com.intellij.openapi.diff.impl.incrementalMerge包,在下文中一共展示了Change类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromChanges
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
@NotNull
public static LineBlocks fromChanges(@NotNull List<Change> changes) {
// changes may come mixed, need to sort them to get correct intervals
Collections.sort(changes, ChangeList.CHANGE_ORDER);
List<Diff> diffs = new ArrayList<Diff>(changes.size());
for (Change change : changes) {
if (!change.isValid()) { continue; }
int start1 = change.getChangeSide(FragmentSide.SIDE1).getStartLine();
int end1 = change.getChangeSide(FragmentSide.SIDE1).getEndLine();
Interval interval1 = Interval.fromTo(start1, end1);
int start2 = change.getChangeSide(FragmentSide.SIDE2).getStartLine();
int end2 = change.getChangeSide(FragmentSide.SIDE2).getEndLine();
Interval interval2 = Interval.fromTo(start2, end2);
diffs.add(new Diff(interval1, interval2, change.getType().getTypeKey()));
}
return new LineBlocks(diffs);
}
示例2: fromChanges
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
@Nonnull
public static LineBlocks fromChanges(@Nonnull List<Change> changes) {
// changes may come mixed, need to sort them to get correct intervals
Collections.sort(changes, ChangeList.CHANGE_ORDER);
List<Diff> diffs = new ArrayList<Diff>(changes.size());
for (Change change : changes) {
if (!change.isValid()) { continue; }
int start1 = change.getChangeSide(FragmentSide.SIDE1).getStartLine();
int end1 = change.getChangeSide(FragmentSide.SIDE1).getEndLine();
Interval interval1 = Interval.fromTo(start1, end1);
int start2 = change.getChangeSide(FragmentSide.SIDE2).getStartLine();
int end2 = change.getChangeSide(FragmentSide.SIDE2).getEndLine();
Interval interval2 = Interval.fromTo(start2, end2);
diffs.add(new Diff(interval1, interval2, change.getType().getTypeKey()));
}
return new LineBlocks(diffs);
}
示例3: actionPerformed
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
DataContext dataContext = e.getDataContext();
List<Change> notConflicts = ContainerUtil.collect(getNotConflicts(dataContext));
for (Change change : notConflicts) {
Change.apply(change, MergeList.BRANCH_SIDE);
}
if (myDiffPanel != null) {
myDiffPanel.requestScrollEditors();
}
}
示例4: getNotConflicts
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
private static Iterator<Change> getNotConflicts(MergeList mergeList) {
if (mergeList == null) return new ArrayList<Change>(1).iterator();
return FilteringIterator.create(mergeList.getAllChanges(), MergeList.NOT_CONFLICTS);
}
示例5: getNotConflicts
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
private static Iterator<Change> getNotConflicts(DataContext dataContext) {
MergeList mergeList = MergeList.fromDataContext(dataContext);
if (mergeList == null) return new ArrayList<Change>(1).iterator();
return FilteringIterator.create(mergeList.getAllChanges(), MergeList.NOT_CONFLICTS);
}
示例6: select
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
private void select(Change change) {
if (change == null) return;
myDispatcher.getMulticaster().selectionInPreviewChanged(change.getType().getTextDiffType().getDisplayName());
}
示例7: select
import com.intellij.openapi.diff.impl.incrementalMerge.Change; //导入依赖的package包/类
private void select(Change change) {
if (change == null) return;
myDispatcher.getMulticaster().selectionInPreviewChanged(change.getType().getTextDiffType().getDisplayName());
}