void (@NotNull DocumentEvent event) { myAlarm.cancelAllRequests(); myAlarm.addRequest(() -> ((ImageEditorImpl)viewer.getImageEditor()).setValue(new LightVirtualFile("preview.svg", file.getFileType(), event.getDocument().getText())), 500); }