Bug 234144 - Support of online help published on the web
Support of online help published on the web
Status: CLOSED FIXED
Product: platform
Classification: Unclassified
Component: Help System
7.3.1
PC Windows 7
: P2 (vote)
: 7.4
Assigned To: Jaroslav Havlin
issues@platform
: API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 15:44 UTC by alexander.burdukov
Modified: 2014-04-16 19:11 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed Patch (9.14 KB, patch)
2013-08-19 15:31 UTC, Jaroslav Havlin
Details | Diff
Proposed Patch v2 (7.69 KB, patch)
2013-08-20 08:57 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.burdukov 2013-08-08 15:44:07 UTC
NetBeans provides ability to supplies online help for plugins packaged as a plugin, so the entire help files are stored inside of a plugin.

However, it is not sufficient is some cases. E.g. it is often required to provide online help published on the web. This approach allows following benefits:

1. Tech writers can update online help after the release of corresponding product independently (without updating corresponding plugins).
2. Online help published on the web can be indexed by different search engines like Google.

With the current NetBeans Help system this alternative approach is almost possible. Plugin can register its own custom HelpSet as a service (e.g., via @ServiceProvider(service = HelpSet.class) annotation). This custom help set can take help files from the web and NetBeans already correctly handles such helpsets.

There is only one problem: there is no correct possibility to merge this custom helpset into master helpset.

To merge helpset into master one we have to set corresponding attribute to this helpset. It can be done using following code:

customHelpSet.setKeyData(HelpConstants.HELPSET_MERGE_CONTEXT, HelpConstants.HELPSET_MERGE_ATTR, true);

Unfortunately, this way does not work since interface org.netbeans.modules.javahelp.HelpConstants is not a part of public API (it is the part of internal NB Help System package) and it is not visible to plugins.

Of course, it is possible to just hardcode these constants values and use following code:

customHelpSet.setKeyData("OpenIDE", "mergeIntoMaster", true);

But there is no guarantee that this will work in the future NetBeans versions, since these constants are NB internal and can be changed in the future.

So, we need some extension of public NetBeans Help API to mark the custom helpset as to be merged into master helpset. It can be done via some new API method, or these two constants just can be moved to public API.
Comment 1 Jaroslav Havlin 2013-08-19 15:31:24 UTC
Created attachment 138873 [details]
Proposed Patch

Please check the attached patch.
Would method HelpUtils.mergeCustomHelpset work fine for you?
Thank you.
Comment 2 alexander.burdukov 2013-08-19 16:20:21 UTC
Patch looks OK and it should work fine for me. Please, specify a nightly build where it can be verified.
Comment 3 alexander.burdukov 2013-08-19 18:39:13 UTC
Note, that attached patch contains a fix for another issue, so it should not be committed with commit of the fix for this issue.
Comment 4 Jaroslav Havlin 2013-08-20 08:57:22 UTC
Created attachment 138893 [details]
Proposed Patch v2

(In reply to alexander.burdukov from comment #2)
> Patch looks OK and it should work fine for me. Please, specify a nightly
> build where it can be verified.
OK, but at first the change has to pass an API review.

(In reply to alexander.burdukov from comment #3)
> Note, that attached patch contains a fix for another issue, so it should not
> be committed with commit of the fix for this issue.
Thank you, attaching correct patch.
Comment 5 Jaroslav Havlin 2013-08-20 09:01:43 UTC
Please review the following changes in module Help System (javahelp).

New class:
 org.netbeans.api.javahelp.HelpUtils (contains method mergeCustomHelpset(HelpSet))

Thank you.
Comment 6 alexander.burdukov 2013-08-20 16:15:00 UTC
Patch v2 looks OK for me.
Comment 7 Jaroslav Havlin 2013-08-27 07:07:02 UTC
If there are no objections, I'll integrate the patch tomorrow.
Thanks for reviewing.
Comment 8 Jaroslav Havlin 2013-08-28 07:14:51 UTC
http://hg.netbeans.org/core-main/rev/497c523f37d7
Fixed.
Comment 9 Quality Engineering 2013-08-29 01:41:19 UTC
Integrated into 'main-silver', will be available in build *201308290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/497c523f37d7
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #234144: Support of online help published on the web
Comment 10 alexander.burdukov 2014-04-16 16:45:06 UTC
Verified on latest NB 8.0


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