本文整理汇总了Java中com.intellij.openapi.diff.impl.incrementalMerge.MergeList类的典型用法代码示例。如果您正苦于以下问题:Java MergeList类的具体用法?Java MergeList怎么用?Java MergeList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MergeList类属于com.intellij.openapi.diff.impl.incrementalMerge包,在下文中一共展示了MergeList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tryInitView
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
private void tryInitView() {
if (!hasAllEditors()) return;
if (myMergeList != null) return;
myMergeList = MergeList.create(myData);
myMergeList.addListener(myDividersRepainter);
myStatusUpdater = StatusUpdater.install(myMergeList, myPanel);
Editor left = getEditor(0);
Editor base = getEditor(1);
Editor right = getEditor(2);
setupHighlighterSettings(left, base, right);
myMergeList.setMarkups(left, base, right);
EditingSides[] sides = {getFirstEditingSide(), getSecondEditingSide()};
myScrollSupport.install(sides);
for (int i = 0; i < myDividers.length; i++) {
myDividers[i].listenEditors(sides[i]);
}
if (myScrollToFirstDiff) {
myPanel.requestScrollEditors();
}
if (myMergeList.getErrorMessage() != null) {
myPanel.insertTopComponent(new EditorNotificationPanel() {
{
myLabel.setText(myMergeList.getErrorMessage());
}
});
}
}
示例2: getFragmentStartingLines
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public int[] getFragmentStartingLines() {
TIntHashSet beginnings = new TIntHashSet();
if (myMergeList != null) {
for (int i = 0; i < 2; i++) {
FragmentSide branchSide = FragmentSide.fromIndex(i);
beginnings.addAll(myMergeList.getChanges(branchSide).getNonAppliedLineBlocks().getBeginnings(MergeList.BASE_SIDE));
}
}
int[] result = beginnings.toArray();
Arrays.sort(result);
return result;
}
示例3: install
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public static StatusUpdater install(MergeList mergeList, DiffPanelOuterComponent panel) {
ChangeCounter counters = ChangeCounter.getOrCreate(mergeList);
StatusUpdater updater = new StatusUpdater(panel);
counters.addListener(updater);
updater.onCountersChanged(counters);
return updater;
}
示例4: actionPerformed
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的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();
}
}
示例5: tryInitView
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
private void tryInitView() {
if (!hasAllEditors()) return;
if (myMergeList != null) return;
try {
myMergeList = MergeList.create(myData);
myMergeList.addListener(myDividersRepainter);
myStatusUpdater = StatusUpdater.install(myMergeList, myPanel);
Editor left = getEditor(0);
Editor base = getEditor(1);
Editor right = getEditor(2);
myMergeList.setMarkups(left, base, right);
EditingSides[] sides = {getFirstEditingSide(), getSecondEditingSide()};
myScrollSupport.install(sides);
for (int i = 0; i < myDividers.length; i++) {
myDividers[i].listenEditors(sides[i]);
}
if (myScrollToFirstDiff) {
myPanel.requestScrollEditors();
}
}
catch (final FilesTooBigForDiffException e) {
myPanel.insertTopComponent(new EditorNotificationPanel() {
{
myLabel.setText(e.getMessage());
}
});
}
}
示例6: getFragmentStartingLines
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public int[] getFragmentStartingLines() {
TIntHashSet beginnings = new TIntHashSet();
if (myMergeList != null) {
for (int i = 0; i < 2; i++) {
FragmentSide branchSide = FragmentSide.fromIndex(i);
beginnings.addAll(myMergeList.getChanges(branchSide).getLineBlocks().getBeginnings(MergeList.BASE_SIDE));
}
}
int[] result = beginnings.toArray();
Arrays.sort(result);
return result;
}
示例7: updateView
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
@Override
public void updateView() {
MergeList mergeList = getMergePanel().getMergeList();
if (mergeList != null) mergeList.updateMarkup();
myMergePanelComponent.repaint();
}
示例8: tryInitView
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
private void tryInitView() {
if (!hasAllEditors()) return;
if (myMergeList != null) return;
myMergeList = MergeList.create(myData);
myMergeList.addListener(myDividersRepainter);
myStatusUpdater = StatusUpdater.install(myMergeList, myPanel);
Editor left = getEditor(0);
Editor base = getEditor(1);
Editor right = getEditor(2);
setupHighlighterSettings(left, base, right);
myMergeList.setMarkups(left, base, right);
EditingSides[] sides = {getFirstEditingSide(), getSecondEditingSide()};
EditingSides[] sidesWithApplied = {getFirstEditingSide(true), getSecondEditingSide(true)};
myScrollSupport.install(sides);
for (int i = 0; i < myDividers.length; i++) {
myDividers[i].listenEditors(sidesWithApplied[i]);
}
if (myScrollToFirstDiff) {
myPanel.requestScrollEditors();
}
if (myMergeList.getErrorMessage() != null) {
myPanel.insertTopComponent(new EditorNotificationPanel() {
{
myLabel.setText(myMergeList.getErrorMessage());
}
});
}
}
示例9: getFragmentStartingLines
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
@Override
public int[] getFragmentStartingLines() {
TIntHashSet beginnings = new TIntHashSet();
if (myMergeList != null) {
for (int i = 0; i < 2; i++) {
FragmentSide branchSide = FragmentSide.fromIndex(i);
beginnings.addAll(myMergeList.getChanges(branchSide).getLineBlocks().getBeginnings(MergeList.BASE_SIDE));
}
}
int[] result = beginnings.toArray();
Arrays.sort(result);
return result;
}
示例10: update
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public void update(AnActionEvent e) {
MergeList mergeList = MergeList.fromDataContext(e.getDataContext());
e.getPresentation().setEnabled(getNotConflicts(mergeList).hasNext());
}
示例11: getNotConflicts
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的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);
}
示例12: getMergeList
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public MergeList getMergeList() {
return myMergeList;
}
示例13: dispose
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public void dispose(@NotNull MergeList mergeList) {
ChangeCounter.getOrCreate(mergeList).removeListener(this);
}
示例14: getNotConflicts
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的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);
}
示例15: dispose
import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public void dispose(@Nonnull MergeList mergeList) {
ChangeCounter.getOrCreate(mergeList).removeListener(this);
}