本文整理匯總了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());
}