String literal as error Follow
I'm creating custom reference providers for some annotation attribute which is java.lang.String.
Unlike JSP when my reference returns null as result of resolve() method - it ain't shown as error in Java class.
Plz give some advice how is correct way to make certain string literal in java class as error, i.e. highlight it and prevent from compile.
Please sign in to leave a comment.
You should implement custom highlighter for your reference, either
Annotator or LocalInspectionTool. And to prevent from compilation,
you'll need to create your own validating compiler or use existing
InspectionValidator.
Thnx for advice !