void (EditorEx editor, Random random) { List<Inlay<?>> inlays = editor.getInlayModel().getInlineElementsInRange(0, editor.getDocument().getTextLength()); if (!inlays.isEmpty()) { Disposer.dispose(inlays.get(random.nextInt(inlays.size()))); } }