void (boolean useDefaultSample) { if (!myShouldUpdatePreview || !ApplicationManager.getApplication().isUnitTestMode() && !myEditor.getComponent().isShowing()) { return; } if (myEditor.isDisposed()) return; if (myLastDocumentModificationStamp != myEditor.getDocument().getModificationStamp()) { myTextToReformat = myEditor.getDocument().getText(); } else if (useDefaultSample || myTextToReformat == null) { myTextToReformat = StringUtil.convertLineSeparators(ObjectUtils.notNull(getPreviewText(), "")); } updateEditorState(true); }