com.intellij.psi.search.searches.DefinitionsScopedSearch Java Examples
The following examples show how to use
com.intellij.psi.search.searches.DefinitionsScopedSearch.
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: CSharpTypeImplementationSearcher.java From consulo-csharp with Apache License 2.0 | 6 votes |
@Override public boolean execute(@Nonnull DefinitionsScopedSearch.SearchParameters queryParameters, @Nonnull final Processor<? super PsiElement> consumer) { final PsiElement element = queryParameters.getElement(); if(element instanceof DotNetTypeDeclaration) { return TypeInheritorsSearch.search((DotNetTypeDeclaration) element, queryParameters.getScope(), queryParameters.isCheckDeep(), true, CSharpTransform.INSTANCE).forEach(new Processor<DotNetTypeDeclaration>() { @Override public boolean process(DotNetTypeDeclaration typeDeclaration) { return consumer.process(typeDeclaration); } }); } return true; }
Example #2
Source File: CSharpMethodImplementationsSearcher.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public boolean execute(@Nonnull DefinitionsScopedSearch.SearchParameters queryParameters, @Nonnull Processor<? super PsiElement> consumer) { PsiElement element = queryParameters.getElement(); if(element instanceof DotNetVirtualImplementOwner) { Collection<DotNetVirtualImplementOwner> members = ReadAction.compute(() -> OverrideUtil.collectOverridenMembers((DotNetVirtualImplementOwner) element)); return ContainerUtil.process(members, consumer); } return true; }
Example #3
Source File: HaxeInheritanceDefinitionsSearcher.java From intellij-haxe with Apache License 2.0 | 5 votes |
public static List<HaxeClass> getItemsByQName(final HaxeClass haxeClass) { final List<HaxeClass> result = new ArrayList<HaxeClass>(); DefinitionsScopedSearch.search(haxeClass).forEach(element -> { if (element instanceof HaxeClass) { result.add((HaxeClass)element); } return true; }); return result; }
Example #4
Source File: GotoImplementationAction.java From consulo with Apache License 2.0 | 5 votes |
@RequiredUIAccess @Override public void update(final AnActionEvent event) { if (!DefinitionsScopedSearch.INSTANCE.hasAnyExecutors()) { event.getPresentation().setVisible(false); } else { super.update(event); } }
Example #5
Source File: PomDefinitionSearch.java From consulo with Apache License 2.0 | 5 votes |
@Override public boolean execute(@Nonnull DefinitionsScopedSearch.SearchParameters queryParameters, @Nonnull Processor<? super PsiElement> consumer) { PsiElement queryParametersElement = queryParameters.getElement(); if (queryParametersElement instanceof PomTargetPsiElement) { final PomTarget target = ((PomTargetPsiElement)queryParametersElement).getTarget(); if (target instanceof PsiTarget) { if (!consumer.process(((PsiTarget)target).getNavigationElement())) return false; } } return true; }
Example #6
Source File: ImplementationSearcher.java From consulo with Apache License 2.0 | 4 votes |
protected Query<PsiElement> search(PsiElement element, Editor editor) { return DefinitionsScopedSearch.search(element, getSearchScope(element, editor), isSearchDeep()); }