private static @Nullable String getEntityPlaceholder(@NotNull PsiElement psi) {
    try {
      String text = psi.getText();
      String fastPath = StringUtil.unescapeXmlEntities(text);
      if (!StringUtil.equals(fastPath, text)) return fastPath;
      if (psi.isValid()) {
        final XmlEntityDecl resolve = XmlEntityRefImpl.resolveEntity((XmlElement)psi, text, psi.getContainingFile());
        final XmlAttributeValue value = resolve != null ? resolve.getValueElement() : null;
        if (value != null) {
          return getEntityValue(value.getValue());
        }
      }
    } catch (IndexNotReadyException ignore) {}
    return null;
  }
private static @Nullable String getEntityPlaceholder(@NotNull PsiElement psi)