本文整理汇总了Java中com.intellij.util.containers.MultiMap.createSet方法的典型用法代码示例。如果您正苦于以下问题:Java MultiMap.createSet方法的具体用法?Java MultiMap.createSet怎么用?Java MultiMap.createSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.containers.MultiMap
的用法示例。
在下文中一共展示了MultiMap.createSet方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEverythingDirtyRoots
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private MultiMap<AbstractVcs, FilePath> getEverythingDirtyRoots() {
MultiMap<AbstractVcs, FilePath> dirtyRoots = MultiMap.createSet();
dirtyRoots.putAllValues(groupByVcs(toFilePaths(DefaultVcsRootPolicy.getInstance(myProject).getDirtyRoots())));
List<VcsDirectoryMapping> mappings = myVcsManager.getDirectoryMappings();
for (VcsDirectoryMapping mapping : mappings) {
if (!mapping.isDefaultMapping() && mapping.getVcs() != null) {
AbstractVcs vcs = myVcsManager.findVcsByName(mapping.getVcs());
if (vcs != null) {
dirtyRoots.putValue(vcs, VcsUtil.getFilePath(mapping.getDirectory(), true));
}
}
}
return dirtyRoots;
}
示例2: VcsAnnotationLocalChangesListenerImpl
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
public VcsAnnotationLocalChangesListenerImpl(Project project, final ProjectLevelVcsManager vcsManager) {
myLock = new Object();
myUpdateStuff = createUpdateStuff();
myUpdater = new ZipperUpdater(ApplicationManager.getApplication().isUnitTestMode() ? 10 : 300, Alarm.ThreadToUse.POOLED_THREAD, project);
myConnection = project.getMessageBus().connect();
myLocalFileSystem = LocalFileSystem.getInstance();
VcsAnnotationRefresher handler = createHandler();
myDirtyPaths = new HashSet<String>();
myDirtyChanges = new HashMap<String, VcsRevisionNumber>();
myDirtyFiles = new HashSet<VirtualFile>();
myFileAnnotationMap = MultiMap.createSet();
myVcsManager = vcsManager;
myVcsKeySet = new HashSet<VcsKey>();
myConnection.subscribe(VcsAnnotationRefresher.LOCAL_CHANGES_CHANGED, handler);
}
示例3: getDuplicateDependenciesMap
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private static MultiMap<DependencyConflictId, MavenDomDependency> getDuplicateDependenciesMap(MavenDomProjectModel projectModel) {
final MultiMap<DependencyConflictId, MavenDomDependency> allDependencies = MultiMap.createSet();
Processor<MavenDomProjectModel> collectProcessor = new Processor<MavenDomProjectModel>() {
public boolean process(MavenDomProjectModel model) {
collect(allDependencies, model.getDependencies());
return false;
}
};
MavenDomProjectProcessorUtils.processChildrenRecursively(projectModel, collectProcessor, true);
MavenDomProjectProcessorUtils.processParentProjects(projectModel, collectProcessor);
return allDependencies;
}
示例4: collectAliases
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private static MultiMap<String, String> collectAliases(@NotNull GroovyFile file) {
MultiMap<String, String> aliases = MultiMap.createSet();
for (GrImportStatement anImport : file.getImportStatements()) {
if (anImport.isAliasedImport()) {
final GrCodeReferenceElement importReference = anImport.getImportReference();
if (importReference != null) {
final String refName = importReference.getReferenceName();
if (refName != null) {
aliases.putValue(refName, anImport.getImportedName());
}
}
}
}
return aliases;
}
示例5: getBrokenPluginVersions
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private static MultiMap<String, String> getBrokenPluginVersions() {
if (ourBrokenPluginVersions == null) {
ourBrokenPluginVersions = MultiMap.createSet();
if (System.getProperty("idea.ignore.disabled.plugins") == null && !isUnitTestMode()) {
BufferedReader br = new BufferedReader(new InputStreamReader(PluginManagerCore.class.getResourceAsStream("/brokenPlugins.txt")));
try {
String s;
while ((s = br.readLine()) != null) {
s = s.trim();
if (s.startsWith("//")) continue;
List<String> tokens = ParametersListUtil.parse(s);
if (tokens.isEmpty()) continue;
if (tokens.size() == 1) {
throw new RuntimeException("brokenPlugins.txt is broken. The line contains plugin name, but does not contains version: " + s);
}
String pluginId = tokens.get(0);
List<String> versions = tokens.subList(1, tokens.size());
ourBrokenPluginVersions.putValues(pluginId, versions);
}
}
catch (IOException e) {
throw new RuntimeException("Failed to read /brokenPlugins.txt", e);
}
finally {
StreamUtil.closeStream(br);
}
}
}
return ourBrokenPluginVersions;
}
示例6: DirtBuilder
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
public DirtBuilder(final VcsGuess guess) {
myGuess = guess;
myDirs = MultiMap.createSet();
myFiles = MultiMap.createSet();
myEverythingDirty = false;
myFileTypeManager = FileTypeManager.getInstance();
}
示例7: KnownRepositoryLocations
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
public KnownRepositoryLocations() {
myMap = MultiMap.createSet();
myLocations = new HashMap<Couple<String>, Long>();
myLastRevision = new HashMap<Long, RevisionId>();
myFirstRevision = new HashMap<Long, RevisionId>();
myJustVcs = new HashMap<String, Long>();
myAuthors = new HashMap<String, Long>();
}
示例8: groupByVcs
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private MultiMap<AbstractVcs, FilePath> groupByVcs(@Nullable final Collection<FilePath> from) {
if (from == null) return MultiMap.empty();
MultiMap<AbstractVcs, FilePath> map = MultiMap.createSet();
for (FilePath path : from) {
AbstractVcs vcs = myGuess.getVcsForDirty(path);
if (vcs != null) {
map.putValue(vcs, path);
}
}
return map;
}
示例9: checkFileElement
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@Override
public void checkFileElement(DomFileElement<MavenDomProjectModel> domFileElement,
DomElementAnnotationHolder holder) {
MavenDomProjectModel projectModel = domFileElement.getRootElement();
MultiMap<Pair<String,String>, MavenDomPlugin> duplicates = MultiMap.createSet();
for (MavenDomPlugin plugin : projectModel.getBuild().getPlugins().getPlugins()) {
String groupId = plugin.getGroupId().getStringValue();
String artifactId = plugin.getArtifactId().getStringValue();
if (StringUtil.isEmptyOrSpaces(artifactId)) continue;
if ("".equals(groupId) || "org.apache.maven.plugins".equals(groupId) || "org.codehaus.mojo".equals(groupId)) {
groupId = null;
}
duplicates.putValue(Pair.create(groupId, artifactId), plugin);
}
for (Map.Entry<Pair<String,String>, Collection<MavenDomPlugin>> entry : duplicates.entrySet()) {
Collection<MavenDomPlugin> set = entry.getValue();
if (set.size() <= 1) continue;
for (MavenDomPlugin dependency : set) {
holder.createProblem(dependency, HighlightSeverity.WARNING, "Duplicated plugin declaration");
}
}
}
示例10: checkManagedDependencies
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
private static void checkManagedDependencies(@NotNull MavenDomProjectModel projectModel,
@NotNull DomElementAnnotationHolder holder) {
MultiMap<DependencyConflictId, MavenDomDependency> duplicates = MultiMap.createSet();
collect(duplicates, projectModel.getDependencyManagement().getDependencies());
for (Map.Entry<DependencyConflictId, Collection<MavenDomDependency>> entry : duplicates.entrySet()) {
Collection<MavenDomDependency> set = entry.getValue();
if (set.size() <= 1) continue;
for (MavenDomDependency dependency : set) {
holder.createProblem(dependency, HighlightSeverity.WARNING, "Duplicated dependency");
}
}
}
示例11: splitIntoCopies
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
@NotNull
private static MultiMap<String, WorkingCopyFormat> splitIntoCopies(@NotNull SvnVcs vcs, @NotNull Collection<Change> changes) {
MultiMap<String, WorkingCopyFormat> result = MultiMap.createSet();
SvnFileUrlMapping mapping = vcs.getSvnFileUrlMapping();
for (Change change : changes) {
RootUrlInfo path = mapping.getWcRootForFilePath(ChangesUtil.getFilePath(change).getIOFile());
if (path != null) {
result.putValue(path.getRepositoryUrl(), path.getFormat());
}
}
return result;
}
示例12: AutoMatchStrategy
import com.intellij.util.containers.MultiMap; //导入方法依赖的package包/类
AutoMatchStrategy(final VirtualFile baseDir) {
myBaseDir = baseDir;
myResult = new LinkedList<TextFilePatchInProgress>();
myFolderDecisions = MultiMap.createSet();
}