public static void markInjectedFileUnsuitableForLineComment(@NotNull PsiFile file) {
    if (!InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file)) {
      throw new IllegalArgumentException("This method should be called only on injected files");
    }

    file.putUserData(INJECTION_FORBIDS_LINE_COMMENTS, true);
  }
public static void markInjectedFileUnsuitableForLineComment(@NotNull PsiFile file)