@Override @Nullable public Object findTemplateSource(@NotNull String name) throws IOException {
  File file=resolveName(name);
  TemplateSource templateSource=TemplateSource.open(file);
  pushTemplateFolder(file.getParentFile());
  return templateSource;
}

@ Override @ Nullable public Object findTemplateSource ( @ NotNull String name ) throws IOException { File file = resolveName ( name ) ; TemplateSource templateSource = TemplateSource . open ( file ) ; pushTemplateFolder ( file . getParentFile ( ) ) ; return templateSource ; }
this method is called directly from freemarker
