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


Java MergeList类代码示例

本文整理汇总了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());
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:MergePanel2.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:MergePanel2.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MergePanel2.java

示例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();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:ApplyNonConflicts.java

示例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());
      }
    });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:MergePanel2.java

示例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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:MergePanel2.java

示例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();

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:DiffPreviewPanel.java

示例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());
      }
    });
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:31,代码来源:MergePanel2.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:MergePanel2.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ApplyNonConflicts.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ApplyNonConflicts.java

示例12: getMergeList

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

示例13: dispose

import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public void dispose(@NotNull MergeList mergeList) {
  ChangeCounter.getOrCreate(mergeList).removeListener(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:MergePanel2.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:ApplyNonConflicts.java

示例15: dispose

import com.intellij.openapi.diff.impl.incrementalMerge.MergeList; //导入依赖的package包/类
public void dispose(@Nonnull MergeList mergeList) {
  ChangeCounter.getOrCreate(mergeList).removeListener(this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:MergePanel2.java


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