use of com.perl5.lang.perl.psi.impl.PerlImplicitSubDefinition in project Perl5-IDEA by Camelcade.
the class PerlImplicitDeclarationsService method registerAnonSub.
@NotNull
public PerlImplicitSubDefinition registerAnonSub(@NotNull String namespaceName, @NotNull String baseName, @Nullable PerlValue returnValue) {
PerlImplicitSubDefinition subDefinition = new PerlImplicitSubDefinition(myPsiManager, baseName, namespaceName, Collections.emptyList(), returnValue, true);
doRegister(mySubsMap, subDefinition);
return subDefinition;
}
use of com.perl5.lang.perl.psi.impl.PerlImplicitSubDefinition 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