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


Java CommittedChangesTreeBrowser类代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser的典型用法代码示例。如果您正苦于以下问题:Java CommittedChangesTreeBrowser类的具体用法?Java CommittedChangesTreeBrowser怎么用?Java CommittedChangesTreeBrowser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CommittedChangesTreeBrowser类属于com.intellij.openapi.vcs.changes.committed包,在下文中一共展示了CommittedChangesTreeBrowser类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addListMultipleSelectionListener

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
public void addListMultipleSelectionListener(final @NotNull Consumer<List<Change>> listener) {
  myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(final ListSelectionEvent e) {
      List<GitCommit> commits = myTable.getSelectedObjects();

      final List<Change> changes = new ArrayList<Change>();
      // We need changes in asc order for zipChanges, and they are in desc order in Table
      ListIterator<GitCommit> iterator = commits.listIterator(commits.size());
      while (iterator.hasPrevious()) {
        changes.addAll(iterator.previous().getChanges());
      }

      listener.consume(CommittedChangesTreeBrowser.zipChanges(changes));
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GitCommitListPanel.java

示例2: getSelectedChanges

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
@Nullable
public List<Change> getSelectedChanges() {
  TableModel model = getModel();
  if (!(model instanceof GraphTableModel)) {
    return null;
  }
  List<Change> changes = ((GraphTableModel)model).getSelectedChanges(sortSelectedRows());
  return changes == null ? null : CommittedChangesTreeBrowser.zipChanges(changes);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:VcsLogGraphTable.java

示例3: createCenterPanel

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
  myCenterPanel.add(CARD_STATUS, scrollPane);
  myTreeBrowser = new CommittedChangesTreeBrowser(myProject, Collections.<CommittedChangeList>emptyList());
  Disposer.register(this, myTreeBrowser);
  myTreeBrowser.setHelpId(getHelpId());
  myCenterPanel.add(CARD_CHANGES, myTreeBrowser);
  return myCenterPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:UpdateInfoTree.java

示例4: run

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
@Override
public void run(ContinuationContext context) {
  final List<Change> changesForPatch;
  try {
    final List<CommittedChangeList> lst = loadSvnChangeListsForPatch(myDescription);
    changesForPatch = CommittedChangesTreeBrowser.collectChanges(lst, true);
    for (Change change : changesForPatch) {
      if (change.getBeforeRevision() != null) {
        preloadRevisionContents(change.getBeforeRevision());
      }
      if (change.getAfterRevision() != null) {
        preloadRevisionContents(change.getAfterRevision());
      }
    }
  }
  catch (VcsException e) {
    context.handleException(e, true);
    return;
  }
  final List<Change> binaryChanges = filterOutBinary(changesForPatch);
  if (binaryChanges != null && ! binaryChanges.isEmpty()) {
    myTheirsBinaryChanges.addAll(binaryChanges);
  }
  if (! changesForPatch.isEmpty()) {
    myTheirsChanges.addAll(changesForPatch);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:MergeFromTheirsResolver.java

示例5: gatherNotLoadedData

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
private boolean gatherNotLoadedData() {
  if (myDataBeingAdded) return false;
  final int[] rows = myJBTable.getSelectedRows();
  final List<GitHeavyCommit> commits = new ArrayList<GitHeavyCommit>();
  final List<CommitI> forComparison = new ArrayList<CommitI>();

  final MultiMap<VirtualFile,AbstractHash> missingHashes = new MultiMap<VirtualFile, AbstractHash>();
  for (int i = rows.length - 1; i >= 0; --i) {
    final int row = rows[i];
    final CommitI commitI = myTableModel.getCommitAt(row);
    if (commitI == null || commitI.holdsDecoration()) continue;
    final GitHeavyCommit details = fullCommitPresentation(commitI);
    if (details == null) {
      missingHashes.putValue(commitI.selectRepository(myRootsUnderVcs), commitI.getHash());
    } else if (missingHashes.isEmpty()) {   // no sense in collecting commits when s
      forComparison.add(commitI);
      commits.add(details);
    }
  }
  if (! missingHashes.isEmpty()) {
    myDetailsCache.acceptQuestion(missingHashes);
    return false;
  }
  if (Comparing.equal(myCommitsInRepositoryChangesBrowser, forComparison)) return true;
  myCommitsInRepositoryChangesBrowser.clear();
  myCommitsInRepositoryChangesBrowser.addAll(forComparison);

  final List<Change> changes = new ArrayList<Change>();
  for (GitHeavyCommit commit : commits) {
    changes.addAll(commit.getChanges());
  }
  final List<Change> zipped = CommittedChangesTreeBrowser.zipChanges(changes);
  myRepositoryChangesBrowser.setChangesToDisplay(zipped);
  return true;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:36,代码来源:GitLogUI.java

示例6: onDetailsLoaded

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
@Override
protected void onDetailsLoaded(@Nonnull List<VcsFullCommitDetails> detailsList) {
  List<Change> changes = ContainerUtil.newArrayList();
  List<VcsFullCommitDetails> detailsListReversed = ContainerUtil.reverse(detailsList);
  for (VcsFullCommitDetails details : detailsListReversed) {
    changes.addAll(details.getChanges());
  }
  changes = CommittedChangesTreeBrowser.zipChanges(changes);
  myChangesBrowser.setChangesToDisplay(changes);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:MainFrame.java

示例7: createCenterPanel

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
  myCenterPanel.add(CARD_STATUS, scrollPane);
  myTreeBrowser = new CommittedChangesTreeBrowser(myProject, Collections.emptyList());
  Disposer.register(this, myTreeBrowser);
  myTreeBrowser.setHelpId(getHelpId());
  myCenterPanel.add(CARD_CHANGES, myTreeBrowser);
  return myCenterPanel;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:UpdateInfoTree.java

示例8: collectAllChanges

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
@NotNull
private static List<Change> collectAllChanges(@NotNull List<CommitNode> commitNodes) {
  return CommittedChangesTreeBrowser.zipChanges(collectChanges(commitNodes));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PushLog.java

示例9: collectAllChanges

import com.intellij.openapi.vcs.changes.committed.CommittedChangesTreeBrowser; //导入依赖的package包/类
@Nonnull
private static List<Change> collectAllChanges(@Nonnull List<CommitNode> commitNodes) {
  return CommittedChangesTreeBrowser.zipChanges(collectChanges(commitNodes));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:PushLog.java


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