@Override
  public void dispose() {
    EditorImpl.assertIsDispatchThread();
    if (isValid()) {
      int offset = getOffset(); // We want listeners notified after disposal, but want inlay offset to be available at that time
      putUserData(OFFSET_BEFORE_DISPOSAL, offset);
      putUserData(ID_BEFORE_DISPOSAL, getId());
      //noinspection unchecked
      getTree().removeInterval((T)this);
      myEditor.getInlayModel().notifyRemoved(this);
    }
  }
@Override
  public void dispose()