private void updateInlines(@NotNull Document document) {
    @NotNull Collection<InlineWatch> inlines = getDocumentInlines(document);
    if (inlines.isEmpty()) return;

    Set<InlineWatch> toRemove = new HashSet<>();
    for (InlineWatch inlineWatch : inlines) {
      if (!inlineWatch.updatePosition()) {
        toRemove.add(inlineWatch);
      }
    }
    removeInlines(toRemove);
  }
private void updateInlines(@NotNull Document document)