public static <T extends PsiElement> Location<T> fromPsiElement(final T element) {
    return fromPsiElement(element, null);
  }
public static <T extends PsiElement> Location<T> fromPsiElement(final T element)