void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); UReferenceExpression awtColorConstantReference = getReferenceExpression(element); if (awtColorConstantReference == null) return; UastCodeGenerationPlugin generationPlugin = UastCodeGenerationPlugin.byLanguage(element.getLanguage()); if (generationPlugin == null) return; UastElementFactory pluginElementFactory = generationPlugin.getElementFactory(project); String jbColorConstant = JBColor.class.getName() + '.' + buildColorConstantName(element); UQualifiedReferenceExpression jbColorConstantReference = pluginElementFactory.createQualifiedReference(jbColorConstant, element); if (jbColorConstantReference != null) { generationPlugin.replace(awtColorConstantReference, jbColorConstantReference, UQualifiedReferenceExpression.class); } }