private static @NotNull Collection<String> getLanguagesForIntentions(@NotNull PsiFile hostFile,
                                                                       @Nullable PsiElement psiElementAtOffset,
                                                                       @Nullable PsiFile injectedFile) {
    Set<String> languageIds = new HashSet<>();
    for (Language language : hostFile.getViewProvider().getLanguages()) {
      languageIds.add(language.getID());
    }

    if (injectedFile != null) {
      for (Language language : injectedFile.getViewProvider().getLanguages()) {
        languageIds.add(language.getID());
      }
    }

    if (psiElementAtOffset != null) {
      for (PsiElement element = psiElementAtOffset; element != null; element = element.getParent()) {
        languageIds.add(element.getLanguage().getID());
        if (element instanceof PsiFile) break;
      }
    }

    return languageIds;
  }
private static @NotNull Collection<String> getLanguagesForIntentions(@NotNull PsiFile hostFile,
                                                                       @Nullable PsiElement psiElementAtOffset,
                                                                       @Nullable PsiFile injectedFile)