void (final VirtualFile inc1, final String s) { WriteAction.run( () -> { FileDocumentManager.getInstance().getDocument(inc1).setText(s); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); } ); }