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 31044

Summary: need jhindexer to deal with help branding
Product: www Reporter: Patrick Keegan <pkeegan>
Component: Builds & RepositoriesAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker Keywords: I18N
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Test case - unpack ZIP, configure ${nbroot}, run build.xml, Help -> Contents, search for "modules"

Description Patrick Keegan 2003-02-13 22:42:29 UTC
We need a way to create different search databases for branded and unbranded versions of 
the docs. 

For example, could the jhindexer task, when running on a branded help set, be aware of the 
base help set and exclude the base versions of branded files?
Comment 1 Jesse Glick 2003-02-14 01:58:56 UTC
Created attachment 8944 [details]
Test case - unpack ZIP, configure ${nbroot}, run build.xml, Help -> Contents, search for "modules"
Comment 2 Jesse Glick 2003-02-14 02:05:16 UTC
Have it working. Attached ZIP gives a complete working example, but
the quick summary:

1. Keep unbranded build script, e.g. nb_all/usersguide/build.xml
exactly the same. All changes happen in branding area.

2. f4j_all/usersguide/build.xml (e.g.) would contain a <jhindexer> which:

a. Uses basedir/includes from nb_all/usersguide/javahelp

b. Sets db to be in f4j_all/usersguide/javahelp

c. Includes an additional <brandedfileset> with basedir/includes from
f4j_all/usersguide/javahelp (include **/*.html typically)

3. The build script then just creates e.g.
f4j_all/usersguide/netbeans/modules/docs/locale/usersguide_f4j.jar
with the contents of f4j_all/usersguide/javahelp

The new <jhindexer> task, when it sees a <brandedfileset>, behaves a
bit differently (see Ant task Javadoc for gory details):

1. All filesets, both the "implicit" unbranded one and all branded
ones, are merged together into a temporary directory.

2. During that merge, branding suffixes on (HTML) files are removed;
more-specific files like x_f4j.html will overwrite more general files
like x.html.

3. The search database is created as usual where you specify.

4. But then the search database files are given the branding suffix
too, so that JavaHelp when running inside the branded IDE will pick up
the branded database automatically.
Comment 3 Jesse Glick 2003-02-14 02:13:11 UTC
Adding I18N keyword just to make it easier to find when looking up
branding-related stuff.

BTW did not specifically test with localized (JA) files, but should be
no different. As now, just include the JA files instead of the plain
files, and set locale="ja" on <jhindexer>.
Comment 4 Jesse Glick 2003-02-14 03:11:17 UTC
committed     Up-To-Date  1.8        
nbbuild/antsrc/org/netbeans/nbbuild/JHIndexer.java