There are some methods which I always want to statically import (Collectors.toList for example). I would like to be able to configure Intellij to mark as warning or even error the usage of these methods with class name ("Collectors.toList()" should be a warning, "toList()" should not). The suggestion to statically import the method is already available, I just need the warning/error.
I've tried "Structural search inspection" and did not managed to solve it, "$expression$.collect(Collectors.toList())" pattern matches ".collect(toList())" as well, so the warning does not go away after static import.
Is there a way to do this?