use of org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.StructureAnnotationDeclarationValidationResult in project qi4j-sdk by Qi4j.
the class StructureAnnotationDeclaredCorrectlyInspection method verifyAnnotationDeclaredCorrectly.
@Nullable
protected final ProblemDescriptor[] verifyAnnotationDeclaredCorrectly(@NotNull PsiVariable psiVariable, @NotNull PsiAnnotation structureAnnotation, @NotNull InspectionManager manager) {
StructureAnnotationDeclarationValidationResult annotationCheck = validateStructureAnnotationDeclaration(psiVariable);
switch(annotationCheck) {
case invalidInjectionType:
String message = message("injections.structure.annotation.declared.correctly.error.invalid.injection.type", psiVariable.getType().getCanonicalText());
AbstractFix removeStructureAnnotationFix = createRemoveAnnotationFix(structureAnnotation);
ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(structureAnnotation, message, removeStructureAnnotationFix, GENERIC_ERROR_OR_WARNING);
return new ProblemDescriptor[] { problemDescriptor };
}
return null;
}
Aggregations