本文整理汇总了Java中com.intellij.openapi.util.Trinity.getSecond方法的典型用法代码示例。如果您正苦于以下问题:Java Trinity.getSecond方法的具体用法?Java Trinity.getSecond怎么用?Java Trinity.getSecond使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.Trinity
的用法示例。
在下文中一共展示了Trinity.getSecond方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildModel
import com.intellij.openapi.util.Trinity; //导入方法依赖的package包/类
public DefaultTreeModel buildModel(final List<? extends ChangeList> changeLists,
final Trinity<List<VirtualFile>, Integer, Integer> unversionedFiles,
final List<LocallyDeletedChange> locallyDeletedFiles,
final List<VirtualFile> modifiedWithoutEditing,
final MultiMap<String, VirtualFile> switchedFiles,
@Nullable Map<VirtualFile, String> switchedRoots,
@Nullable final List<VirtualFile> ignoredFiles,
@Nullable final List<VirtualFile> lockedFolders,
@Nullable final Map<VirtualFile, LogicalLock> logicallyLockedFiles) {
resetGrouping();
buildModel(changeLists);
if (!modifiedWithoutEditing.isEmpty()) {
resetGrouping();
buildVirtualFiles(modifiedWithoutEditing, ChangesBrowserNode.MODIFIED_WITHOUT_EDITING_TAG);
}
final boolean manyUnversioned = unversionedFiles.getSecond() > unversionedFiles.getFirst().size();
if (manyUnversioned || ! unversionedFiles.getFirst().isEmpty()) {
resetGrouping();
if (manyUnversioned) {
final ChangesBrowserNode baseNode = new ChangesBrowserManyUnversionedFilesNode(myProject, unversionedFiles.getSecond(), unversionedFiles.getThird());
model.insertNodeInto(baseNode, root, root.getChildCount());
} else {
buildVirtualFiles(unversionedFiles.getFirst(), ChangesBrowserNode.UNVERSIONED_FILES_TAG);
}
}
if (switchedRoots != null && ! switchedRoots.isEmpty()) {
resetGrouping();
buildSwitchedRoots(switchedRoots);
}
if (!switchedFiles.isEmpty()) {
resetGrouping();
buildSwitchedFiles(switchedFiles);
}
if (ignoredFiles != null && !ignoredFiles.isEmpty()) {
resetGrouping();
buildVirtualFiles(ignoredFiles, ChangesBrowserNode.IGNORED_FILES_TAG);
}
if (lockedFolders != null && !lockedFolders.isEmpty()) {
resetGrouping();
buildVirtualFiles(lockedFolders, ChangesBrowserNode.LOCKED_FOLDERS_TAG);
}
if (logicallyLockedFiles != null && ! logicallyLockedFiles.isEmpty()) {
resetGrouping();
buildLogicallyLockedFiles(logicallyLockedFiles);
}
if (!locallyDeletedFiles.isEmpty()) {
resetGrouping();
ChangesBrowserNode locallyDeletedNode = ChangesBrowserNode.create(myProject, LOCALLY_DELETED_NODE);
model.insertNodeInto(locallyDeletedNode, root, root.getChildCount());
buildLocallyDeletedPaths(locallyDeletedFiles, locallyDeletedNode);
}
collapseDirectories(model, root);
sortNodes();
return model;
}