void (@NotNull String key, @NotNull ProblemsHolder holder, @NotNull UCallExpression expression) { ProblemHolderUtilKt.registerUProblem(holder, expression, DevKitThemesBundle.message("inspections.unregistered.named.color", key), new LocalQuickFix() { @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull @Override public String getFamilyName() { return DevKitThemesBundle.message("inspections.unregistered.named.color.fix.navigate.theme.metadata.file"); } @Override public boolean startInWriteAction() { return false; } @Override public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final Collection<VirtualFile> metadataFiles = FilenameIndex.getAllFilesByExt(project, ThemeMetadataJsonSchemaProviderFactoryKt.THEME_METADATA_JSON_EXTENSION); if (metadataFiles.isEmpty()) return; final PsiFile[] psiFiles = PsiUtilCore.toPsiFiles(PsiManager.getInstance(project), metadataFiles).toArray(PsiFile.EMPTY_ARRAY); DataManager.getInstance().getDataContextFromFocusAsync() .onSuccess(context -> { NavigationUtil.getPsiElementPopup(psiFiles, DevKitThemesBundle.message( "inspections.unregistered.named.color.fix.navigate.theme.metadata.file.popup.title")) .showInBestPositionFor(context); }); } @Override public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return IntentionPreviewInfo.EMPTY; } }); }