public static @Nullable String getEntitiesString(@Nullable PsiElement context, @NotNull String inspectionName) {
    if (context == null) return null;
    PsiFile containingFile = context.getContainingFile().getOriginalFile();

    final InspectionProfile profile = InspectionProjectProfileManager.getInstance(context.getProject()).getCurrentProfile();
    XmlEntitiesInspection inspection = (XmlEntitiesInspection)profile.getUnwrappedTool(inspectionName, containingFile);
    if (inspection != null) {
      return inspection.getAdditionalEntries();
    }
    return null;
  }
public static @Nullable String getEntitiesString(@Nullable PsiElement context, @NotNull String inspectionName)