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 153793 - Help Contents menu item may become disabled permanently
Summary: Help Contents menu item may become disabled permanently
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Victor Vasilyev
Depends on:
Reported: 2008-11-24 16:16 UTC by vieiro
Modified: 2016-06-28 03:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Sample module suite (tar/gz) (3.70 KB, application/x-gzip)
2008-11-24 16:18 UTC, vieiro

Note You need to log in before you can comment on or make changes to this bug.
Description vieiro 2008-11-24 16:16:51 UTC
In a NetBeans RCP application (NB 6.5, possibly 7.0) the "Help/Help Contents" menu item is disabled after first use.

To reproduce:

- Create a NetBeans RCP application with a Help Set (use the wizard, the help set may be empty).
- Open "layer.xml in context" and remove some entries of "Services/JavaHelp"
- Run the application.
- Select Help/Help Contents. The Help Window appears.
- Close the Help Window.
- The Help/Help Contents menu item is disabled.

No exceptions/errors observed in IDE log.

I'm attaching a test case with source code.

This fits a P2 issue, I think.

Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System: Linux version 2.6.24-19-generic running on i386; UTF-8; es_ES (nb)
Userdir: /home/antonio/.netbeans/6.5
Comment 1 vieiro 2008-11-24 16:18:19 UTC
Created attachment 74092 [details]
Sample module suite (tar/gz)
Comment 2 vieiro 2008-11-24 17:42:14 UTC
D'oh! Disabling the "General Online Help" module in "ide10" solved the issue.

I'm leaving it open, anyway, awaiting for evaluation from expert people.
Comment 3 Jaromir Uhrik 2008-11-26 10:57:20 UTC
Passing to help system - please evaluate.
Comment 4 Alexei Mokeev 2008-12-04 12:12:21 UTC
Given the workaround I'm changing the priority to P3 and target milestone 7.0M2 
Detailed evaluation should be provide by then.
Comment 5 Alexei Mokeev 2009-03-05 13:57:25 UTC
Moving JH issues to Victor.
Comment 6 Victor Vasilyev 2009-03-27 02:50:52 UTC
Described behavior is still reproducible on the latest version of the NB platform:

Product Version: NetBeans IDE Dev (Build 200903260733)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Userdir: C:\Documents and Settings\vvg\.netbeans\dev

The behavior is implemented by the method org.netbeans.modules.javahelp.HelpCtxProcessor$ShortcutAction.updateEnabled()
contained in the JavaHelp Integration module (javahelp)


The development action described in the steps to reproduce is absolutely incorrect:
- Open "layer.xml in context" and _remove_ some entries of "Services/JavaHelp"

Because, it violates agreements about NetBeans JavaHelp Integration and it will destroy internal integrity of the

If a module defines a JavaHelp set then it MUST also define "Services/JavaHelp" (and vice versa).

Note, if the module in the attached example won't also contain the JavaHelp set, i.e. both "Services/JavaHelp" and
JavaHelp set are not defined, then the NetBeans platform won't show the Help/Help Contents menu item at all. 
It is correct behavior of a NetBeans RCP application that is built from correct sources.

If we try to reproduce described use case then we would notice that the Master Help Page will be displayed ("This window
contains the master set of all installed documentation."). In normal situation a user should never see this page. A help
page of the application should be shown instead. 

The NetBeans platform relies on the fact that all modules included into application are correct and doesn't check them
at start up to save the time. If at least one module defines a JavaHelp set then the Help/Help Contents menu item will
be displayed and enabled. In case of the attached example, when the "Help Contents" action will be called in the first
time by a user then the NetBeans platform won't find any help IDs. After that the platform disables this action until an
event of changing of the help set. The event can occur if the application provides dynamical changing of the help set at

I guess the platform has got absolutely correct behavior in all described cases even if incorrect modules are bundled
into application.

I'll close this issue as invalid, but I am ready to take into account any alternative opinions.
Comment 7 puce 2009-03-30 15:43:39 UTC
I had a similar issue lately when running the NetBeans Platform (v6.5) application as JNLP application. I asked the
mailing list, but I got no solution. Since I don't use JavaHelp currently, I've hidden the menu item explicitly. I don't
know if this enabled/ disabled effect also occures if there are some JavaHelp files there.

@OP: How do you launch your application? Also as JNLP application?

@NetBeans Team: Can you verify this when running as JNLP application?
Comment 8 Victor Vasilyev 2009-04-02 02:16:23 UTC
Helo, puce!

A use case described by you for the JNLP mode of the NetBeans RCP is 100% reproducible even on the latest version (6.7M3).

But! Again, I guess, it is not an issue of the NetBeans, because:

* My strong opinion is each good application should provide the help info distributed together with the application.
* Nevertheless, if an application doesn't provide the help info then it means that the help support is not required in
such application at all, and functionality of the help support can be excluded from the application.

Try the following against an application whose modules do not define JavaHelp documentation and do not use the help service:
1. Select your NetBeans Platform Application (module suite project) in the Project window of the IDE
2. Call context menu and choose the "Properties" menu item.
3. Deselect (exclude) the module "platformXXX/JavaHelp Integration" in the list "Platform modules" that is displayed in
the opened dialog "Project Properties - <your project>". And, then press the button "OK".
4. Run JNLP application.

Result: Started application doesn't have the menu item Help/Help Context at all.

Note, it will also reduce overheads of downloading and storing for the JNLP application. 

Of course, you will need include back the module "JavaHelp Integration" if you will have decided that the application
should have the help info in the JavaHelp format. 

Victor Vasilyev

P.S. Thanks for giving a chance to me to resolve an another philosophical issue (i.e. not a technical issue!) around
NetBeans :-) I hope, you will agree with the approach proposed by me here. Otherwise, please reopen this issue.
Comment 9 bruehlicke 2009-05-05 17:03:40 UTC
Well, my modules do provide all the help docs and I do want the Help->Help Content option. It also works - but only 1
time. After it has been clicked once it gets disabled. My RCP is using Nb 6.5. So for me this issue is not resolved. I
hope there are some advice how I should resolve this issue.

Comment 10 bruehlicke 2009-05-06 20:45:11 UTC
... and to avoid any misanderstandings - I do run this in "normal" mode - i.e. NOT in JNLP
Comment 11 Victor Vasilyev 2009-05-13 16:51:07 UTC
Hello  bruehlicke,

It seems it is third use case in the scope of this issue. And, the use case is absolutely correct from my viewpoint.

I've tried to play with the NetBeans 6.5, but I am not able to reproduce the issue described by you.
- NetBeans IDE uses the help functionality itself, so I've tried to open the help contents many times in the IDE. All is OK.
- I've also tried to create a simple NetBeans RCP application with a module that contains a Help Set. The help contents
can also be opened many times without any problems.

The disabling of the [NetBeans Main Menu/Help/Help Contents] menu item means that the Help System hasn't found any help
sets after first start. It should be never happened if at least one module correctly defines own help set. 

I need more info to understand how to resolve the issue.

1. Could you please, check that your module implements the Help Set correctly. 
To have a clear experiment you can create a new fake module with a help set, and attach it in your RCP application. 
And, of course, the JavaHelp Help Set Wizard should be used for it against the module. I hope the wizard has been also
used to create a help set in your module!?

You can also compare differences of the contents of the files between your module and new fake module, including the
following "Important Files":
* XML Layer - a virtual help set file should be defined in the Services/JavaHelp virtual folder and it should define a
correct uri of your <moduleName>-helpset.xml file.
* Module Manifest - it should define a requirement:
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help

2. If all is OK at the step 1 then, please, start your RCP application with the following three options:


and attach the console log to this issue and reopen it.

Comment 12 bruehlicke 2009-05-29 02:23:36 UTC

I checked your steps and all files/specs are present. 

Running with the additional arguments as you suggested resulted in the following which clearly identifies the problem.
I.e. it does not find the ide.welcome helpset.

The question is just why ? And what it is looking for - there is no ide.welcom module in my RCP app ?

The only branding I did with respect to Java Help is that I used  in my app. - Can this have somnething to do with it ?  

FINE [org.netbeans.modules.javahelp]: processing help context ref:
FINE [org.netbeans.modules.javahelp]: creating help context presenter from
FINE [org.netbeans.modules.javahelp]: new ShortcutAction:
ide.welcome showmaster=true
FINE [org.netbeans.modules.javahelp]: not checking ide.welcome specifically
FINE [org.netbeans.modules.javahelp]: enabled:
xml=MultiFileObject@f5c3a6[Menu/Help/org-netbeans-modules-usersguide-master.xml] id=ide.welcome enabled=null
FINE [org.netbeans.modules.javahelp]: ShortcutAction.actionPerformed: ide.welcome showmaster=true
FINE [org.netbeans.ui.javahelp]: Showing help ID: ide.welcome
FINE [org.netbeans.ui.javahelp]: Showing help ID: ide.welcome
INFO [org.netbeans.ui.metrics.javahelp]: Showing help ID: ide.welcome
FINE [org.netbeans.modules.javahelp]: showing progress dialog...
FINE [org.netbeans.modules.javahelp]: posting request from progress dialog...
FINE [org.netbeans.modules.javahelp]: getting master...
FINE [org.netbeans.modules.javahelp]: searching for instances of HelpSet...
FINE [org.netbeans.modules.javahelp]: Help.stateChanged
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: creating help set from ref:
FINE [org.netbeans.modules.javahelp]: listing helpsets: [Vinland Stress Analyzer Editor Help, Vinland Stress Octahedral
Help, Vinland Stress Weakplane Help, Vinland Stress Cobra Help, Vinland Stress UCS Calculator Help, Vinland Project Help]
FINE [org.netbeans.modules.javahelp]: listing helpsets: [Vinland Stress Analyzer Editor Help, Vinland Stress Octahedral
Help, Vinland Stress Weakplane Help, Vinland Stress Cobra Help, Vinland Stress UCS Calculator Help, Vinland Project Help]
FINE [org.netbeans.modules.javahelp]: getting master...done
FINE [org.netbeans.modules.javahelp]: did not find id ide.welcome
FINE [org.netbeans.modules.javahelp]: enabled:
xml=MultiFileObject@f5c3a6[Menu/Help/org-netbeans-modules-usersguide-master.xml] id=ide.welcome enabled=false
FINE [org.netbeans.modules.javahelp]: finding help set for ide.welcome...
FINE [org.netbeans.modules.javahelp]: listing helpsets: [Vinland Stress Analyzer Editor Help, Vinland Stress Octahedral
Help, Vinland Stress Weakplane Help, Vinland Stress Cobra Help, Vinland Stress UCS Calculator Help, Vinland Project Help]
FINE [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID ide.welcome was not found.
FINE [org.netbeans.modules.javahelp]: finding help set for ide.welcome...done
FINE [org.netbeans.modules.javahelp]: posting request from progress dialog...request finished.
FINE [org.netbeans.modules.javahelp]: dialog done.
FINE [org.netbeans.modules.javahelp]: displayHelpInFrame
FINE [org.netbeans.modules.javahelp]: ensureFrameViewer
FINE [org.netbeans.modules.javahelp]:         creating new
FINE [org.netbeans.modules.javahelp]:         adding content
FINE [org.netbeans.modules.javahelp]: displayInJHelp: ide.welcome null
FINE [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID ide.welcome was not found.

Comment 13 bruehlicke 2009-06-30 14:28:44 UTC
(added this to the dev@openide discussion forum)

After removing the "General Online Help" module in "ide10"  as suggested in the issue- it now WORKS !

But .... when launching my app I get a nasty Warning Error Dialog message telling me "Warning - Could not install some
modules.  IDE Platform - module org.netbeans.modules.userguide/1 was needed and not found"
Comment 14 bruehlicke 2009-06-30 16:30:45 UTC
OK, after 5 min of Geertjan looking at this he fixed it ! 

The problem is with the "ide.welcome". This is a mapID ! It turns out that this mapID is MANDATORY and since I did not
have it anymore we run into the problem. So by simply adding

   <mapID target="ide.welcome" url="vinlandproject-introduction.html"/>

to my initial map file did the TRICK and now all is working.

Thanx a lot to all of you out there. This is what makes NetBeans so wonderful to work with.

Comment 15 Geertjan Wielenga 2009-06-30 16:36:11 UTC
I closed the loop by adding a new FAQ:
Comment 16 Budd 2016-06-28 03:32:09 UTC
Like to share this.

If you are getting invalid view or can't find welcome ide for javahelp
maybe after added restore the help system this is what I do...

1. delete any recently added helpsets---the folders named /docs in the NBP module
2. find the main layer.xml it will be in one of the main modules in your project that controls your services/help

navigate to layer.xml...this layer in context
            ...delete the recently added helpset 

3. rebuild the changed modules and rerun see if your helpsystem comes back!

If it still does work goto services/javahelp and restore the userguide item.

This is what I have been doing to restore / fix the javahelp in NBP.

Hope this saves someone from a bunch of frustration.