private int adjustOffsetToInlay(int offset) {
    CharSequence text = myEditor.getDocument().getImmutableCharSequence();
    int hostWhitespaceStart = CharArrayUtil.shiftBackward(text, offset, WHITESPACE) + 1;
    int hostWhitespaceEnd = CharArrayUtil.shiftForward(text, offset, WHITESPACE);
    Editor hostEditor = myEditor;
    if (myEditor instanceof EditorWindow) {
      hostEditor = ((EditorWindow)myEditor).getDelegate();
      hostWhitespaceStart = ((EditorWindow)myEditor).getDocument().injectedToHost(hostWhitespaceStart);
      hostWhitespaceEnd = ((EditorWindow)myEditor).getDocument().injectedToHost(hostWhitespaceEnd);
    }
    List<Inlay<?>> inlays = ParameterHintsPresentationManager.getInstance().getParameterHintsInRange(hostEditor,
                                                                                                  hostWhitespaceStart, hostWhitespaceEnd);
    for (Inlay inlay : inlays) {
      int inlayOffset = inlay.getOffset();
      if (myEditor instanceof EditorWindow) {
        if (((EditorWindow)myEditor).getDocument().getHostRange(inlayOffset) == null) continue;
        inlayOffset = ((EditorWindow)myEditor).getDocument().hostToInjected(inlayOffset);
      }
      return inlayOffset;
    }
    return offset;
  }
private int adjustOffsetToInlay(int offset)