本文整理汇总了Java中com.intellij.util.containers.ContainerUtil.collect方法的典型用法代码示例。如果您正苦于以下问题:Java ContainerUtil.collect方法的具体用法?Java ContainerUtil.collect怎么用?Java ContainerUtil.collect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.containers.ContainerUtil
的用法示例。
在下文中一共展示了ContainerUtil.collect方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyzeModuleConflicts
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public static void analyzeModuleConflicts(final Project project,
final Collection<? extends PsiElement> scopes,
final UsageInfo[] usages,
final PsiElement target,
final MultiMap<PsiElement,String> conflicts) {
if (scopes == null) return;
final VirtualFile vFile = PsiUtilCore.getVirtualFile(target);
if (vFile == null) return;
List<GroovyPsiElement> groovyScopes =
ContainerUtil.collect(scopes.iterator(), new FilteringIterator.InstanceOf<GroovyPsiElement>(GroovyPsiElement.class));
analyzeModuleConflicts(project, groovyScopes, usages, vFile, conflicts);
scopes.removeAll(groovyScopes);
RefactoringConflictsUtil.analyzeModuleConflicts(project, scopes, usages, vFile, conflicts);
}
示例2: findPropertiesByKey
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public List<IProperty> findPropertiesByKey(@NotNull @NonNls String key) {
synchronized (myLock) {
ensurePropertiesLoaded();
return ContainerUtil.collect(myPropertiesMap.get(key).iterator());
}
}
示例3: findPropertiesByKey
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Override
@NotNull
public List<IProperty> findPropertiesByKey(@NotNull String key) {
ensurePropertiesLoaded();
synchronized (lock) {
return ContainerUtil.collect(myPropertiesMap.get(key).iterator());
}
}
示例4: visitFile
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Override
public void visitFile(final PsiFile file) {
final VirtualFile virtualFile = file.getVirtualFile();
if (virtualFile == null) {
return;
}
final Project project = file.getProject();
Document document = PsiDocumentManager.getInstance(project).getDocument(file);
if (document == null) return;
DaemonProgressIndicator progress = new DaemonProgressIndicator();
progress.start();
try {
TextEditorHighlightingPassRegistrarEx passRegistrarEx = TextEditorHighlightingPassRegistrarEx.getInstanceEx(project);
List<TextEditorHighlightingPass> passes = passRegistrarEx.instantiateMainPasses(file, document, HighlightInfoProcessor.getEmpty());
List<GeneralHighlightingPass> gpasses = ContainerUtil.collect(passes.iterator(), FilteringIterator.instanceOf(GeneralHighlightingPass.class));
for (final GeneralHighlightingPass gpass : gpasses) {
gpass.setHighlightVisitorProducer(new NotNullProducer<HighlightVisitor[]>() {
@NotNull
@Override
public HighlightVisitor[] produce() {
gpass.incVisitorUsageCount(1);
return new HighlightVisitor[]{new DefaultHighlightVisitor(project, highlightErrorElements, runAnnotators, true)};
}
});
}
for (TextEditorHighlightingPass pass : gpasses) {
pass.doCollectInformation(progress);
List<HighlightInfo> infos = pass.getInfos();
for (HighlightInfo info : infos) {
if (info == null) continue;
//if (info.type == HighlightInfoType.INJECTED_LANGUAGE_FRAGMENT) continue;
if (info.getSeverity().compareTo(HighlightSeverity.INFORMATION) <= 0) continue;
result.add(Pair.create(file, info));
}
}
}
finally {
progress.stop();
}
}
示例5: getDependencies
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public <T extends ProjectExternalDependency> List<T> getDependencies(@NotNull Class<T> aClass) {
return ContainerUtil.collect(myDependencies.iterator(), FilteringIterator.instanceOf(aClass));
}
示例6: getChildren
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private List<Component> getChildren() {
return ContainerUtil.collect(IJSwingUtilities.getChildren(myPanel));
}
示例7: getAlreadyLoadedChildren
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
public List<RepositoryTreeNode> getAlreadyLoadedChildren() {
return ContainerUtil.collect(myChildren.iterator(), FilteringIterator.instanceOf(RepositoryTreeNode.class));
}