VirtualFile[] (AbstractTreeNode<?> kid, Function<? super AbstractTreeNode<?>, VirtualFile[]> converterFunction) { if (kid instanceof BasePsiNode) { Object value = kid.getValue(); VirtualFile virtualFile = PsiUtilCore.getVirtualFile((PsiElement)value); return new VirtualFile[]{virtualFile}; } if (converterFunction != null) { final VirtualFile[] result = converterFunction.fun(kid); if (result != null) { return result; } } return VirtualFile.EMPTY_ARRAY; }