protected @Nullable String encode(final String name, PsiElement psiElement) {
    try {
      return new URI(null, null, name, null).toString();
    }
    catch (Exception ignored) {
      return name;
    }
  }
protected @Nullable String encode(final String name, PsiElement psiElement)