use of com.perl5.lang.perl.parser.moose.psi.impl.PerlMooseOverrideStatement in project Perl5-IDEA by Camelcade.
the class PerlMooseSuperReference method resolveInner.
@NotNull
@Override
protected ResolveResult[] resolveInner(boolean incompleteCode) {
// fixme not really dry with simpleresolver and superresolver. Need some generics magic
List<ResolveResult> result = new ArrayList<>();
PsiElement element = getElement();
PerlMooseOverrideStatement overrideStatement = PsiTreeUtil.getParentOfType(element, PerlMooseOverrideStatement.class);
if (overrideStatement != null) {
String packageName = PerlPackageUtil.getContextPackageName(element);
String subName = overrideStatement.getSubName();
Project project = element.getProject();
for (PsiElement targetElement : PerlMro.resolveSub(project, packageName, subName, true)) {
result.add(new PsiElementResolveResult(targetElement));
}
}
return result.toArray(new ResolveResult[result.size()]);
}
Aggregations