protected @NotNull List<@NotNull TextRange> getSpellcheckOuterContentRanges(@NotNull T element) {
    PsiLanguageInjectionHost injectionHost;
    if (element instanceof PsiLanguageInjectionHost) {
      injectionHost = (PsiLanguageInjectionHost)element;
    }
    else {
      injectionHost = null;
    }
    if (injectionHost != null) {
      List<TextRange> ranges = new SmartList<>();
      String text = element.getText();
      InjectedLanguageManager.getInstance(injectionHost.getProject()).enumerate(injectionHost, (injectedPsi, places) -> {
        ranges.addAll(ContainerUtil.mapNotNull(places, place -> adjustInjectionRangeForExclusion(text, place.getRangeInsideHost())));
      });
      return ranges;
    }
    return Collections.emptyList();
  }
protected @NotNull List<@NotNull TextRange> getSpellcheckOuterContentRanges(@NotNull T element)