本文整理匯總了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));
}