void (@NotNull final V psiField) { if (!ReadonlyStatusHandler.ensureDocumentWritable(myProject, InjectedLanguageEditorUtil.getTopLevelEditor(myEditor).getDocument())) return; PostprocessReformattingAspect.getInstance(myProject).disablePostprocessFormattingInside( () -> ApplicationManager.getApplication().runWriteAction(() -> doRestoreState(psiField))); }