Beware: Some Tooltips in Idea are intentionally wrong

In the Java editor the "(O)" icon in the left gutter has a tooltip that shows which classes override the methods.
Or at least I thought it does that.
However that tooltip can be wrong and JetBrains argued that this is not-a-bug.
The tooltip may or may not show a class depending on the current temperature in Haiti.

So DO NOT RELY ON THE INFORMATION IN THE TOOLTIP.

Apparently if the result is fast enough, it is deemed irrelevant wether it is also correct:
http://www.jetbrains.net/jira/browse/IDEA-4590

Closed with "Won't Fix"

10 comments
Comment actions Permalink

Stephen,

how can you rely on this information?

"Stephen Kelvin" <mail@gremlin.info> wrote in message
news:decje6$mj2$1@is.intellij.net...

In the Java editor the "(O)" icon in the left gutter has a tooltip that

shows which classes override the methods.

Or at least I thought it does that.
However that tooltip can be wrong and JetBrains argued that this is

not-a-bug.

The tooltip may or may not show a class depending on the current

temperature in Haiti.
>

So DO NOT RELY ON THE INFORMATION IN THE TOOLTIP.

>

Apparently if the result is fast enough, it is deemed irrelevant wether it

is also correct:

http://www.jetbrains.net/jira/browse/IDEA-4590

>

Closed with "Won't Fix"



0
Comment actions Permalink

Eugene Vigdorchik (JetBrains) wrote:

Stephen,

how can you rely on this information?


In a perfect way I would always only use automatic refactorings
and Idea would provide refactorings that are powerful enough to
solve any task at hand.

Unfortunately I am neither that disciplined nor is Idea that powerful.
So I may still change code manually, e.g. delete the method, add or
remove parameters etc.
Failing to do that in all overriders would break the code in subtle ways
(read: "only detected by clients after deployment").

0
Comment actions Permalink

In this particular case I tend to bring up the method hierarchy window
(or whatever it's called, one of the ctrl-*-h variants) so that I can
more easily navigate to the different implementations without having to
go back to the root.

(I'm not arguing against having correct information in the tooltip, just
pointing out another way of working with IDEA which sometimes works
better for me, in case someone hasn't seen this feature.)

0
Comment actions Permalink

"No documentation is better than incomplete or incorrect documentation"... so what's going on here? IntelliJ's main competitive argument is that it implements its features better than competing IDEs: this would seem to be as if Jetbrains were shooting themselves in the foot. It seriously undermines the product's credibility.

0
Comment actions Permalink

Thanks for the reminder. In theory I knew about that feature.
Still I frequently find myself navigating back and forth using the
"(o)" and "(i)" icons where the hierarchy view would be much more
convenient.

BTW: Thanks for all the support on this one.
I've posted the latest test results in the Jira issue - seems to be
that the problem has to do with Idea's window size and the Look and
Feel. How strange is that?!

Jonas Kvarnström wrote:

In this particular case I tend to bring up the method hierarchy window
(or whatever it's called, one of the ctrl-*-h variants) so that I can
more easily navigate to the different implementations without having to
go back to the root.

(I'm not arguing against having correct information in the tooltip, just
pointing out another way of working with IDEA which sometimes works
better for me, in case someone hasn't seen this feature.)

0
Comment actions Permalink

Stephen Kelvin wrote:

I've posted the latest test results in the Jira issue - seems to be
that the problem has to do with Idea's window size and the Look and
Feel. How strange is that?!


Well, I suppose that if the window is large enough that the tooltip fits
inside the window boundaries, a lightweight popup can be used, and
otherwise a heavyweight popup must be used. Perhaps the text is
actually there, but the lightweight popup sometimes miscalculates its
size so that the last line is not shown, while the heavyweight popup
uses different code which always gets the size right?

0
Comment actions Permalink

I've posted the latest test results in the Jira issue - seems to be
that the problem has to do with Idea's window size and the Look and
Feel. How strange is that?!


After reading your test results and playing around with one of my old
bug reports ( http://www.jetbrains.net/jira/browse/IDEA-4213 ) I can
reliably reproduce the behaviour. I even found a file where some
tooltips are OK and others are empty, while after shrinking IDEA's main
window it's the exact oposite, the previously empty ones are showing OK
now and the others are empty.

--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Well, I suppose that if the window is large enough that the tooltip fits
inside the window boundaries, a lightweight popup can be used, and
otherwise a heavyweight popup must be used. Perhaps the text is
actually there, but the lightweight popup sometimes miscalculates its
size so that the last line is not shown, while the heavyweight popup
uses different code which always gets the size right?


It doesn't seem to be as simple as that. There are other tooltips which
are OK with a large main window and screwed up with a small window.

Stephen:
Did you observe any difference if a method is overridden in only one
module or in several modules?

--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Martin Fuhrer wrote:

Stephen:
Did you observe any difference if a method is overridden in only one
module or in several modules?


No, does not seem to make any difference at all.
I am inclined to think it's a graphical problem only, even though it is
not directly dependent on tooltip size:
In Metal LAF everything seems to work fine.

0
Comment actions Permalink

In Metal LAF everything seems to work fine.


Not in my case. I have a method which is overridden in two different
classes. With Alloy LAF the tooltip only contains 'Is overridden in'.
After switching to Metal LAF the first class is shown in the tooltip,
but the second one is still missing.

--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0

Please sign in to leave a comment.