void (@NotNull PsiTemplateExpression element) { if (!HighlightingFeature.STRING_TEMPLATES.isAvailable(element) || element.getLiteralExpression() == null) { return; } PsiExpression processor = element.getProcessor(); if (!(PsiUtil.skipParenthesizedExprDown(processor) instanceof PsiReferenceExpression reference)) { return; } PsiElement target = reference.resolve(); if (!(target instanceof PsiField field) || !"STR".equals(field.getName())) { return; } PsiClass containingClass = field.getContainingClass(); if (containingClass == null || !JAVA_LANG_STRING_TEMPLATE.equals(containingClass.getQualifiedName())) { return; } myHolder.registerProblem(processor, InspectionGadgetsBundle.message("inspection.redundant.string.fix.remove.str.processor.description"), new RemoveStrTemplateProcessorFix()); }