private static boolean registerIfParentNotDisposed(@NotNull Disposable parent, @NotNull Disposable disposable) {
    if (parent instanceof ComponentManager && ((ComponentManager)parent).isDisposed()) {
      return false;
    }

    return Disposer.tryRegister(parent, disposable);
  }
private static boolean registerIfParentNotDisposed(@NotNull Disposable parent, @NotNull Disposable disposable)