use of com.perl5.lang.perl.psi.impl.PerlBuiltInSubDefinition in project Perl5-IDEA by Camelcade.
the class PerlImplicitDeclarationsProvider method readSub.
private void readSub(@NotNull PerlImplicitDeclarationsService declarationsService, @NotNull String namespaceName, @NotNull Element element) {
String subName = element.getAttributeValue(NAME);
if (StringUtil.isEmpty(subName)) {
LOG.warn("Missing or empty name attribute for sub");
return;
}
PerlImplicitSubDefinition subDefinition;
if (PerlPackageUtil.CORE_NAMESPACE.equals(namespaceName)) {
subDefinition = new PerlBuiltInSubDefinition(declarationsService.getPsiManager(), subName, PerlPackageUtil.CORE_NAMESPACE, readArguments(element.getChild(ARGUMENTS_ELEMENT), subName));
} else {
subDefinition = new PerlImplicitSubDefinition(declarationsService.getPsiManager(), subName, namespaceName, readArguments(element.getChild(ARGUMENTS_ELEMENT), subName));
}
declarationsService.registerSub(subDefinition);
}
Aggregations