void (@NotNull T toImport) { Project project = toImport.getProject(); PsiElement element = myRef.getElement(); if (element == null) return; if (!FileModificationService.getInstance().preparePsiElementForWrite(element)) return; WriteCommandAction.runWriteCommandAction(project, QuickFixBundle.message("add.import"), null, () -> AddSingleMemberStaticImportAction.bindAllClassRefs(element.getContainingFile(), toImport, toImport.getName(), toImport.getContainingClass())); }