Java Code Examples for com.intellij.util.containers.ContainerUtil#map2SetNotNull()
The following examples show how to use
com.intellij.util.containers.ContainerUtil#map2SetNotNull() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VisiblePackBuilder.java From consulo with Apache License 2.0 | 5 votes |
private VisiblePack applyHashFilter(@Nonnull DataPack dataPack, @Nonnull Collection<String> hashes, @Nonnull PermanentGraph.SortType sortType) { final Set<Integer> indices = ContainerUtil.map2SetNotNull(hashes, partOfHash -> { CommitId commitId = myHashMap.findCommitId(new CommitIdByStringCondition(partOfHash)); return commitId != null ? myHashMap.getCommitIndex(commitId.getHash(), commitId.getRoot()) : null; }); VisibleGraph<Integer> visibleGraph = dataPack.getPermanentGraph().createVisibleGraph(sortType, null, indices); return new VisiblePack(dataPack, visibleGraph, false, new VcsLogFilterCollectionBuilder().with(new VcsLogHashFilterImpl(hashes)).build()); }
Example 2
Source File: CommitChangeListDialog.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull @Override public Collection<VirtualFile> getRoots() { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); return ContainerUtil.map2SetNotNull(myBrowser.getCurrentDisplayedChanges(), (change) -> vcsManager.getVcsRootFor(ChangesUtil.getFilePath(change))); }
Example 3
Source File: ChangesUtil.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull public static Set<AbstractVcs> getAffectedVcses(@Nonnull Collection<Change> changes, @Nonnull Project project) { return ContainerUtil.map2SetNotNull(changes, change -> getVcsForChange(change, project)); }