Can't underline method signature in inspection
I'm writing a Java inspection that checks for issues with some methods.
When one is found I would like to underline (with a ProblemsHolder instance) the method signature (modifiers, return type, name, parameters, ...) but not the whole method body.
From some experimentation I found out that I want a PsiElement that includes all the children of the PsiMethod instance minus the last one which seems to be the method's body.
I couldn't find a way to do this.
The only alternative seems to register a problem for each child of the method (minus the last one) but I don't think this is the correct way to implement this.
Please sign in to leave a comment.
Please use overload with textRange for the task and use the psiMethod as element
Anna
That works fine, thank you.