First, the error highlighting options are great. There must be about 100 or
so categories of things you can set to show as errors or warnings (I prefer
warnings for most things).
Here's the problem:
1. Setting them. You have to change each setting individually. There is
no way to click on Class Metrics or Abstraction Issues, for example, and
have all the child entries set. (Maybe, you'll concede this point but then
suggest it's a one time setup process that wont interfere with your work or
cause you much pain after you make your selections....this is not the case)
2. Changing them. (Somewhat a duplicate of the item above, but notice the
use case). Where this is relevant is in the case that presented itself a
few days ago:
I inherited some functionality that I had to make changes to. One class in
particular was killing me. It was about 4400 lines long. And (brace
yourself)....the right scroll bar area where error indicators are shown was
SOLID yellow (I use "set to warning" for most stuff).
This leads to next problem: because the class was so long and/or had so
many "problems" as determined by IDEA, it was killing the CPU. I was at 99%
CPU usage nearly all the time. Each keystoke took seconds to register. I
cant code like this. I need to turn off some of the error analysis and
This leads to the next problem: (see point 1 above). You cant changes
these settings quickly. You cant set toggle a category off (or set to "do
not report"). And I sure as hell am not going to set each one individually
for one problematic class...only to have to reset the all individually when
I resume my normal work. And even if I toggled them off....
This (would) lead to the next problem: it wouldn't remember my settings.
Even I don't remember my settings. A quick look now shows that I have "Cast
to a concrete class" as Do Not Show and "Cast references one of its
subclasses" (yes, IDEA has a typo...it should read: "Cast references to
one of its subclasses"), set to As Warnings. There are many other places
where I set error reporting in a custom manner. Toggling wont be enough.
IDEA needs to remember my settings and allow me to come back to them (ie. a
temporary change). It would also need to let me change categories en masse.
So how did I solve my problem? With good old fashioned brute force...I
copied and pasted bits and chunks of the class, method by method, into IDEA.
I then "fixed" the problems reported, got rid of the Yellow lines, and
copied and pasted some more. Saddam is treated better than this.
In addition to the problems noted above and solution proposed, something
just occured to me...why did I have to fix these problems? Why couldn't
IDEA fix my problems for me? (If this is already available, I will cry. I
spent hours on this effort.) IDEA fixes my problems on a one-by-one basis.
It will flip my equalsIgnoreCase problems. But I hate clicking on each line
individually waiting for the light bulb to come up prompting me on how to
fix it. That works great for my code...I dont have too many Yellows in my
code. When I inherit code, I'd like to fix all problems of a similar nature
at one time (ie. add "final" to the variable declarations where appropriate,
for example). In other words, act like Reformat Code....just fix it. All
Am I off base? Are these good features to ask for?
-setting error highlighting in categories (as well as individually which
is the current method)
-remembering error highlighting settings (to be able to come back to if
the need arises to change them temporarily)
-option of fixing of problems reported in error analysis, en masse, by
category (fix all my equalsIgnoreCase problems, not just the line in
question, if I set that to Warning or Error)