structural search - non static field declaration
Hi
I'd like to find all non-static declaration of loggers. The template below works fine to find all logger declarations...
Logger $logger$ = Logger.getLogger($param$);
...but how can I say that I only want to find the ones that are non-static. I tried without success :(
Match expected:
protected final transient Logger LOGGER = Logger.getLogger(Foo.class);
No match expected:
private static final Logger LOGGER = Logger.getLogger(Bar.class);
Any help is highly appreciated. Thanks in advance!
--Etienne
Please sign in to leave a comment.
This is not currently possible. I thought there was an issue for this in the
tracker at http://jetbrains.net/jira but I can't find it, so you should file it.
etienne wrote:
Hello etienne,
There's already a dedicated inspection for this called 'Non-constant logger'
from 'Logging issues' category.
-
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Maxim
Thanks for telling me! Works like a charm.
--Etienne
P.S. The support you guys provide is just great!
http://www.jetbrains.net/jira/browse/IDEADEV-2852
etienne wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"