Notebook inlay: add logging to prevent NPE

GitOrigin-RevId: c59be4b171c45ecfaa27c13e0ec779f4f3ef3c18
This commit is contained in:
Ilya.Kazakevich
2023-11-09 18:56:01 +01:00
committed by intellij-monorepo-bot
parent 6ae71617a8
commit 1224ab28e1

View File

@@ -34,7 +34,14 @@ fun EditorEx.addComponentInlay(
priority,
offset,
)
)!!
)
if (inlay == null) {
if (isDisposed) {
throw IllegalStateException("Editor is disposed")
}
throw IllegalStateException(
"Component is null for $component, $isRelatedToPrecedingText, $showAbove, $showWhenFolded, $priority, $offset")
}
updateUiOnParentResizeImpl(component.parent as JComponent, WeakReference(component))
component.revalidate()