void (@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) { if (myOriginalHandler != null) myOriginalHandler.execute(editor, charTyped, dataContext); if (EmmetOptions.getInstance().isEmmetEnabled() && EmmetOptions.getInstance().isPreviewEnabled()) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return; PsiFile file = PsiUtilBase.getPsiFileInEditor(editor, project); if (file == null) return; EmmetPreviewHint existingBalloon = EmmetPreviewHint.getExistingHint(editor); if (existingBalloon != null) return; PsiDocumentManager.getInstance(file.getProject()).commitDocument(editor.getDocument()); ReadAction.nonBlocking(() -> { if (editor.isDisposed() || EmmetPreviewHint.getExistingHint(editor) != null) return null; return EmmetPreviewUtil.calculateTemplateText(editor, file, true); }) .finishOnUiThread(ModalityState.current(), templateText -> { if (StringUtil.isNotEmpty(templateText)) { EmmetPreviewHint.createHint((EditorEx)editor, templateText, file.getFileType()).showHint(); EmmetPreviewUtil.addEmmetPreviewListeners(editor, file, false); } }) .submit(AppExecutorUtil.getAppExecutorService()); } }