本文整理汇总了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));
}
});
}
示例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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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);
}
示例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;
}
示例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));
}
示例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));
}