Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 203810 - When hint is displayed, tip should be hidden
When hint is displayed, tip should be hidden
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Hints
7.1
PC Linux
: P3 (vote)
: 7.1
Assigned To: Jan Lahoda
issues@java
:
: 62959 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-17 09:12 UTC by Geertjan Wielenga
Modified: 2012-11-29 06:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
"Convert to switch" looks horrible with hint and tooltip! (7.81 KB, image/png)
2011-10-17 09:26 UTC, Geertjan Wielenga
Details
"Convert to multicatch" looks horrible with hint and tooltip! (14.14 KB, image/png)
2011-10-17 09:30 UTC, Geertjan Wielenga
Details
A case where the error description tooltip is useful (IMO) (13.84 KB, application/octet-stream)
2011-10-17 09:54 UTC, Jan Lahoda
Details
Example of why this may be a bad idea (9.92 KB, image/png)
2011-10-20 16:33 UTC, Jesse Glick
Details
Another even worse example (26.41 KB, image/png)
2011-10-24 16:50 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2011-10-17 09:12:55 UTC
When Alt-Enter is pressed, or the mouse is clicked on the hint lightbulb, a hint appears. At the same time, the tip that relates to the problem is shown. This is annoying and unnecessary. When a hint is displayed, the tip should not be shown.
Comment 1 Jan Lahoda 2011-10-17 09:20:25 UTC
I am a bit confused - do you mean the tooltip that contains the error/warning description? Should that be disabled when the fix list is shown? Then the users will not know the error/warning message the fixes relate to?
Comment 2 Geertjan Wielenga 2011-10-17 09:26:37 UTC
Created attachment 112115 [details]
"Convert to switch" looks horrible with hint and tooltip!
Comment 3 Geertjan Wielenga 2011-10-17 09:27:43 UTC
I think the context of the hint is normally obvious. The tooltip is normally not very helpful and takes up space. Also not something I see in IntelliJ and in Eclipse, simply because it is not necessary and takes up space.
Comment 4 Geertjan Wielenga 2011-10-17 09:30:11 UTC
Created attachment 112116 [details]
"Convert to multicatch" looks horrible with hint and tooltip!
Comment 5 Jan Lahoda 2011-10-17 09:35:56 UTC
I agree that in this case it does not seem great - the question is whether the problem should not be rephrased to "The warning texts produced by some hints are not good." (which is true anyway, and a well written warnings texts would be very welcome).

But, I can of course easily disable the tooltip, either for all errors/warnings or only for warnings. I am only afraid that we (well, me in this case, maybe reassigning to you?) will be buried under a pile of complaints when I do. Please specify exactly what should I do.
Comment 6 Geertjan Wielenga 2011-10-17 09:44:02 UTC
OK, thanks for the open response. Personally, I think that we should always hide a tooltip if a hint is shown. But maybe I will blog about it and ask the community what they think. If you know of specific scenarios where the tooltip is useful when there is a hint, please tell me.
Comment 7 Jan Lahoda 2011-10-17 09:54:16 UTC
Created attachment 112117 [details]
A case where the error description tooltip is useful (IMO)

A case where I think the tooltip is quite useful. In fact, it is the simplest way I know of to get the error message, well formatted, only by using keyboard.
Comment 8 Geertjan Wielenga 2011-10-17 10:08:24 UTC
I don't understand why that tooltip is useful. The hint is clear that "undefined" needs to be defined.
Comment 9 Jan Lahoda 2011-10-17 12:14:10 UTC
http://hg.netbeans.org/jet-main/rev/ef2418d7533e
Comment 10 Geertjan Wielenga 2011-10-17 13:19:39 UTC
Nice solution, thanks very much.
Comment 11 Quality Engineering 2011-10-18 14:15:46 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ef2418d7533e
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #203810: disabling error tooltip when the fixes are being shown.
Comment 12 Jesse Glick 2011-10-20 16:33:32 UTC
Created attachment 112275 [details]
Example of why this may be a bad idea

Can you guess from the screenshot what the error message here is? Note that Mode is successfully imported from a valid dependency.

Answer: "not a statement", but now you need the mouse to find this out (or run a build or guess).
Comment 13 Geertjan Wielenga 2011-10-20 18:22:11 UTC
Then that hint shouldn't be displayed. Or, if there is no way to not display it, the user can hover the mouse over the error annotation to see what the reason is for the problem.
Comment 14 Jesse Glick 2011-10-24 16:43:42 UTC
(In reply to comment #13)
> Then that hint shouldn't be displayed.

Perhaps. Are you going to check through hundreds of hints in the IDE and third-party extensions to verify that they are all appropriate in every case and that the warning/error can be clearly inferred from the hint text?

> the user can hover the mouse over the error annotation

Not if you are a keyboard user. This is a serious A11Y regression.
Comment 15 Jesse Glick 2011-10-24 16:50:40 UTC
Created attachment 112379 [details]
Another even worse example

Here the warning tooltip is several lines long:

  Required children missing from element "head".
  ...
  ...
  Otherwise: ... exactly one is a 'title' element.
  ...
  ...

Not only does the hint "Disable..." not give you any clue as to the nature of the warning, it is not a hint you would usually want to accept; better in most cases (not this one as it happens) would be to add the <title>.

I think this change has to be reverted. Some better GUI for displaying warnings in combination with hints in the same popup may be possible, but just suppressing the warning is not workable.
Comment 16 Geertjan Wielenga 2011-10-24 18:03:32 UTC
Could we solve this by reverting the way the option works? I.e., by default, use the same way as always, i.e., by default always show the tooltip. But, if the option has been set (i.e., you need to explicitly make this choice), the tooltip is always hidden?
Comment 17 Jesse Glick 2011-10-31 15:55:29 UTC
A configurable option is the last resort if no real solution seems feasible. The cases you originally reported do indeed look better with the tooltip hidden. What is needed is some new UI which works reasonably for all the cases. Some ideas (not necessarily exclusive):

1. Allow the hint provider to declare that a given warning message is superseded by one or more of the fix texts, so the UI can safely suppress it when the fixes are displayed.

2. Show the warning message physically as part of the list of hints, rather than in a separate popup. Would eliminate the ugly gap in the original screenshots and avoid hiding code above the selected line.

3. Show warning messages some other way than in a tool tip, such as in the status line - possibly just by navigating into the line or line part with a warning, i.e. no Alt-ENTER required. (TBD how lines with multiple warnings should be handled.)
Comment 18 Jan Lahoda 2012-03-21 12:59:35 UTC
See screenshot attached to bug #209850 - the missing warning is very confusing. I am inclining to reverting to pre-7.1 way - it worked mostly OK for many years, and it is really very unpleasant for me at least to work in an IDE without it. As for the suggestions above, "1" is conceptually implementable, but I would say that we would have trouble to find a group of warnings that would want the warning tooltip disabled (it all depends on the context, there may be several warnings on one line). "2" is an idea, but not a design. "3" is something we should probably do, but does not really solve the problem, as not all the warning text may fit into the limited size of the status line (and some compilation errors are multi-line).
Comment 19 Geertjan Wielenga 2012-03-21 13:09:24 UTC
If you revert, please make sure to include some kind of switch to disable it. Whenever I do a demo with NetBeans IDE and the meaningless tips show up that duplicates exactly what the hint already displays, I get questions about UI design in NetBeans IDE, i.e., someone then always asks: "Does NetBeans not have a UI design team? It doesn't seem like it with the tips & hints displaying the same info, at least it should be possible to switch those hints off."
Comment 20 Jan Lahoda 2012-03-21 22:01:13 UTC
FYI: I have implemented #3 in:
http://hg.netbeans.org/jet-main/rev/1bf5ad396d51

Lets see how that works out.
Comment 21 Quality Engineering 2012-03-23 10:35:43 UTC
Integrated into 'main-golden', will be available in build *201203230400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1bf5ad396d51
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #203810: show the message(s) of the error(s)/warning(s) currently under caret in the status line.
Comment 22 Jesse Glick 2012-03-27 21:06:07 UTC
(In reply to comment #20)
> Lets see how that works out.

Seems to work for most cases. Not sure if it is enough or not.
Comment 23 Jesse Glick 2012-05-03 15:38:14 UTC
*** Bug 62959 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo