void (Project project, Template template, Document document, RangeMarker templateRange, Editor editor) { if (!template.getValue(Template.Property.USE_STATIC_IMPORT_IF_POSSIBLE)) { return; } PsiDocumentManager.getInstance(project).commitDocument(document); final PsiFile file = PsiUtilBase.getPsiFileInEditor(editor, project); if (file == null) { return; } DumbService.getInstance(project).withAlternativeResolveEnabled( () -> doStaticImport(project, editor, file, getStaticImportTargets(templateRange, file))); }