@NotNull
    List<Pair<PsiLanguageInjectionHost, Language>> processInjectionWithContext(BaseInjection injection, boolean settingsAvailable) {
      Language language = InjectorUtils.getLanguage(injection);
      if (language == null) return Collections.emptyList();

      boolean separateFiles = !injection.isSingleFile() && StringUtil.isNotEmpty(injection.getValuePattern());

      Ref<Boolean> unparsableRef = Ref.create(myUnparsable);
      List<Object> objects = ContextComputationProcessor.collectOperands(injection.getPrefix(), injection.getSuffix(), unparsableRef, myOperands);
      if (objects.isEmpty()) return Collections.emptyList();
      List<InjectionInfo> result = new ArrayList<>();
      int len = objects.size();
      for (int i = 0; i < len; i++) {
        String curPrefix = null;
        Object o = objects.get(i);
        if (o instanceof String) {
          curPrefix = (String)o;
          if (i == len - 1) return Collections.emptyList(); // IDEADEV-26751
          o = objects.get(++i);
        }
        String curSuffix = null;
        PsiLanguageInjectionHost curHost = null;
        if (o instanceof PsiLanguageInjectionHost) {
          curHost = (PsiLanguageInjectionHost)o;
          if (i == len - 2) {
            Object next = objects.get(i + 1);
            if (next instanceof String) {
              i++;
              curSuffix = (String)next;
            }
          }
        }
        if (curHost == null) {
          unparsableRef.set(Boolean.TRUE);
        }
        else {
          List<TextRange> textBlockInjectedArea = getTextBlockInjectedArea(curHost);
          List<TextRange> injectedArea = (textBlockInjectedArea == null) ? injection.getInjectedArea(curHost) : textBlockInjectedArea;
          for (int j = 0, injectedAreaSize = injectedArea.size(); j < injectedAreaSize; j++) {
            TextRange textRange = injectedArea.get(j);
            TextRange.assertProperRange(textRange, injection);
            result.add(new InjectionInfo(
              curHost, InjectedLanguage.create(injection.getInjectedLanguageId(),
                                               separateFiles || j == 0 ? curPrefix : "",
                                               separateFiles || j == injectedAreaSize - 1 ? curSuffix : "",
                                               true), textRange));
          }
        }
      }

      if (result.isEmpty()) {
        return Collections.emptyList();
      }

      // important: here we use \n only as a good-enough delimiter for regexp matching of concatenation parts
      if (injection.shouldBeIgnored(result.stream().map(InjectionInfo::host).iterator(), "\n")) {
        return Collections.emptyList();
      }

      List<Pair<PsiLanguageInjectionHost, Language>> res = new ArrayList<>();
      if (separateFiles) {
        for (InjectionInfo trinity : result) {
          ContainerUtil.addIfNotNull(res, processInjection(language, Collections.singletonList(trinity), settingsAvailable, false));
        }
      }
      else {
        if (isReferenceInject(language)) {
          // OMG in case of reference inject they confused shreds (several places in the host file to form a single injection) with several injections
          for (InjectionInfo trinity : result) {
            ContainerUtil.addIfNotNull(res, processInjection(language, Collections.singletonList(trinity), settingsAvailable, unparsableRef.get()));
          }
        }
        else {
          ContainerUtil.addIfNotNull(res, processInjection(language, result, settingsAvailable, unparsableRef.get()));
        }
      }
      return res;
    }
@NotNull
    List<Pair<PsiLanguageInjectionHost, Language>> processInjectionWithContext(BaseInjection injection, boolean settingsAvailable)