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.

0
2 comments

Please use overload with textRange for the task and use the psiMethod as element

Anna

0
Avatar
Permanently deleted user

That works fine, thank you.

0

Please sign in to leave a comment.