This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 17424

Summary: Incorrect help is shown
Product: platform Reporter: Jan Lahoda <jlahoda>
Component: Help SystemAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker CC: pzavadsky
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jan Lahoda 2001-11-08 14:39:36 UTC
On build 200111080100:
1. Open dialog Tools/Options/Editing/Editor settings/Java Editor/Indentation
Engine or Tools/Options/Editing/Editor settings/Java Editor/Macros (open really
the dialog for changing the property, but do not click inside it).
2. Press F1 for help. Some generic (incorrect) page is shown.
3. Do not close the help window, use the "Help" button on the dialog to open
help. The correct page is shown.
4. The same applies if you will click into the dialog before invoking the help.

This is probably some kind of focus problem.
The original report is:
Comment 1 _ ttran 2001-11-08 14:57:27 UTC
Jesse, it seems you know best about HelpAction :-)
Comment 2 _ ttran 2001-11-08 15:22:08 UTC
*** Issue 5890 has been marked as a duplicate of this issue. ***
Comment 3 _ ttran 2001-11-08 15:24:05 UTC
make sure to read the bug report #5890 (F1 does not receive correct
help from property sheet pane of docked Debugger view.) to get some
historical insights
Comment 4 Jesse Glick 2001-11-08 17:45:55 UTC
Is this really P2?? This seems like a P4 to me. Users are not even
likely to use F1 when there is an obvious Help button.

There appear to be two unrelated bugs here. For the Indentation Engine
dialog, the correct help appears everywhere except the property sheet.
This appears to be a regression in property sheet code, reproducible
without any dialog, just regular Explorer vs. Prop Sheet. Apparently
HelpAwareJTabbedPane is not doing its job anymore. Petr Z., you most
recently worked on property sheet; any idea?

For the macro dialog, certain parts of the dialog (the table cells and
the JButton's to the right) get help but the blank areas do not. I
will try to investigate what the problem is; the code in the editor
appears correct.
Comment 5 Peter Zavadsky 2001-11-08 19:50:29 UTC
Yes, I was doing the HelpAwareTabbedPane.
I'm going to look at it.
Comment 6 Jesse Glick 2001-11-08 20:02:05 UTC
OK, thanks. Assign back to me for the macro dialog part, I doubt that
is related.
Comment 7 Peter Zavadsky 2001-11-08 21:21:52 UTC
Fixed the part with property sheet, assignig back the problem with
macro to Jesse.

Fix: openide/../openide/explorer/propertysheet/ [1.73]

It seems the problem was the HelpAwareJTabbedPane tried to find the
HelpCtx passed from NodeProperty.Set.getValue("helpID") and if it
failed it returned the default HelpCtx. Instead of returning the
default one now it finds one from its parent which works for this case.
Jesse, if this is not correct step, please let me know.
Comment 8 Jesse Glick 2001-11-09 10:55:05 UTC
Yes, the rule for help in prop sheets is supposed to be this: rows in
the sheet (both the sheet button and property panel) should get help
preferentially from N.P.helpID, failing that from N.PS.helpID, failing
that from the node; other areas in the tab should get help from the
N.PS.helpID, failing that from the node; other areas in the property
sheet outside the tabbed area should get help from the node. I'm
pretty sure that is what it did at some point, but it got broken (I
don't know when exactly, maybe during dstrupl's refactoring). I have a
low-priority task to write some unit tests for this stuff so it
doesn't get broken again.
Comment 9 Peter Zavadsky 2001-11-09 11:03:18 UTC
Yes it was broken during the David's refactoring and when I was
putting it back, didn't recognize the clue from the old sources. 
From your comment it seems the HelpAwareJTabbedPane would need
probably still some refinement. Will see when you make the tests.
Comment 10 Jan Lahoda 2001-11-12 15:57:24 UTC
   I just found, that find&replace dialog has probably the same
problem (this was not visible before, because of another problem in
find&replace dialog).
The previous problem with find&replace was:
Comment 11 Jesse Glick 2001-11-13 11:13:50 UTC
I will work on this today.
Comment 12 Jesse Glick 2001-11-13 15:11:24 UTC
Have patch, will commit tomorrow.
Comment 13 Jesse Glick 2001-11-14 09:55:08 UTC
The global mouse listener was giving some rather misleading results
(1.3.1_01); working around this by explicitly checking root panes if
it is said that a dialog was entered. 1.27
Comment 14 Marian Mirilovic 2001-12-12 12:33:43 UTC
verified in [nb_release330](200112102331)
Comment 15 Quality Engineering 2003-07-01 16:42:52 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.