private T getMappingForHierarchy(@Nullable VirtualFile file) {
    for (VirtualFile cur = file; cur != null; cur = cur.getParent()) {
      T t = doGetImmediateMapping(cur);
      if (t != null) return t;
    }
    return null;
  }
private T getMappingForHierarchy(@Nullable VirtualFile file)