Code Monkey home page Code Monkey logo

javahelp's Introduction

What's here:

jhMaster/ - the main JavaHelp sources and Makefiles
javahelp_nbproject/ - Ant build script and NetBeans project metadata for building JavaHelp
JSearchClient_nbproject/ - Ant build script and NetBeans project metadata for building the JSearch client sources
JSearchIndexer_nbproject/ - Ant build script and NetBeans project metadata for building the JSearch indexer sources

To do a complete build of all JavaHelp JARs with Ant, use 
the "release" target of the Ant script in 
javahelp_nbproject/build.xml

The official build scripts are the Makefiles, not the Ant scripts.
Before using Ant scripts make sure all products of the Makefiles are cleaned.

javahelp's People

Contributors

pranjal10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javahelp's Issues

Javahelp 2.04 does not work with java 1.4

When using javahelp 2.04 (more specifically jh.jar included in
http://download.java.net/javadesktop/javahelp/javahelp2_0_04.zip) in java 1.4

I get the following exception:
java.lang.UnsupportedClassVersionError: javax/help/HelpSet (Unsupported
major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
...

Everything works fine when I use javahelp 2.02.

My java version is java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
on knoppix 3.6

Please provide a build that can be used with java 1.4

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Add tooltip.FavoritesAction to Constants_de.java

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_de.java
Index: Constants_de.java

— Constants_de.java (revision 52)
+++ Constants_de.java (working copy)
@@ -1,31 +1,31 @@
/*

  • @(#)Constants_de.java 1.8 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    /
    /

    • Constants_de.java
      • Constants_de.java
  • Originaly: Constants.java 1.8 - last change made 01/29/99

  • Translated to German by iXOS Software AG, 03/03/1999, Martin Balin
    @@ -115,7 +115,7 @@
    { "search.mid", "Medium"}

    ,

    { "search.midlow", "Medium low"}

    ,

    { "search.low", "Low"}

    ,

    { "favorites.add", "Hinzuf\u00fcgen"}

    ,

    { "favorites.remove", "Entfernem"}

    ,

    { "favorites.folder", "Neuer Ordner"}

    ,
    @@ -133,7 +133,8 @@

    { "tooltip.PrintAction", "Drucken"}

    ,

    { "tooltip.PrintSetupAction", "Seite einrichten"}

    ,

    { "tooltip.ReloadAction", "Neu laden"}

    ,

  • { "tooltip.HomeAction", "Go to home page"},

    • { "tooltip.FavoritesAction", "Add to Favorites"},
    • { "tooltip.HomeAction", "Go to home page"}

    ,

// Accessibility names

{ "access.BackAction", "Previous Button"}

,

Sorry for the extra marked changes, my editor must have converted the newlines
or something. Only real change is the addition of "tooltip.FavoritesAction".
I could possibly update the issue in the coming weeks with actual localized
text if our translation center gets to it in time. I wanted to go ahead and
get the issue entered though. Thank you!

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Implement keyboard shortcuts for help viewer used in JetBrains PyCharm

JetBrains PyCharm apparently uses the JavaHelp help viewer in its PyCharm product (and possibly in other JetBrains IDEs too).

I created a couple of issues in their bug tracker:

I'm guessing this is pretty easy to implement (at least the first one). Pointers to where (in the source code)/how to implement this would be helpful.

Updates to properties for Constants_es.java

Please consider the following updates to some of the properties for the Spanish
translation.

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_es.java
Index: Constants_es.java

— Constants_es.java (revision 52)
+++ Constants_es.java (working copy)
@@ -1,25 +1,25 @@
/*

  • @(#)Constants_es.java 1.3 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    @@ -54,9 +54,9 @@
    Unknown macro: { "helpset.wrongHomeID", "Intentando asignar homeID a {0} pero ya tiene el valor {1}."}
    ,
    { "helpset.subHelpSetTrouble",

    • "Problemas creando subhelpset: {0}."}

    ,

    • "Problemas al crear subhelpset:

    {0}."},
    { "helpset.malformedURL",

    • "URL mal formada: {0}

    ."},

    • "URL mal construida:

    {0}."},
    { "helpset.incorrectURL",
    "URL incorrecta: {0}

    ."},
    { "helpset.wrongText",
    @@ -68,7 +68,7 @@

    Unknown macro: { "helpset.unbalanced", "Etiqueta sin cerrar {0}."},
    { "helpset.wrongLocale",

    • "Aviso: atributo xml:lang {0} estu00E1 en conflicto con el por defecto{1} y
      con {2}"},
    • "Aviso: el atributo xml:lang {0} est\u00E1 en conflicto con el pre
      determinado {1} y con el predeterminado {2}"}

    ,

    Unknown macro: { "helpset.unknownVersion", "Versiu00F3n desconocida {0}."}

    ,

@@ -104,24 +104,24 @@

{ "index.findLabel", "Buscar: "}

,

{ "search.findLabel", "Buscar: "}

,

{ "search.hitDesc", - "N\u00FAmero de apariciones en el documento"}

,

  • "N\u00FAmero de ocurrencias en el documento"},

{ "search.qualityDesc", - "El m\u00E1s bajo valor de penalizaci\u00F3n en el documento" }, + "Valor inferior de penalizaci\u00F3n en el documento" }

,

{ "search.high", "Alto"}

,

{ "search.midhigh", "Medio alto"}

,

{ "search.mid", "Medio"}

,

{ "search.midlow", "Medio bajo"}

,

{ "search.low", "Bajo"}

,

  • { "favorites.add", "Anadir"}

    ,

  • { "favorites.remove", "Quitar"}

    ,
    +

    { "favorites.add", "A\u00f1adir"}

    ,
    +

    { "favorites.remove", "Eliminar"}

    ,

    { "favorites.folder", "Nueva carpeta"}

    ,

    { "favorites.name", "Nombre"}

    ,

    { "favorites.cut", "Cortar"}

    ,

    { "favorites.paste", "Pegar"}

    ,

    { "favorites.copy", "Copiar"}

    ,

  • { "history.homePage", "P\u00E1gina de inicio"}

    ,
    +

    { "history.homePage", "P\u00E1gina Inicio"}

    ,

    { "history.unknownTitle", "<T\u00EDtulo de p\u00E1gina desconocido>"}

    ,

@@ -132,20 +132,20 @@

{ "tooltip.PrintSetupAction", "Configuraci\u00F3n de p\u00E1gina"}

,

{ "tooltip.ReloadAction", "Recargar"}

,

  • { "tooltip.FavoritesAction", "Anadir a favoritos"}

    ,
    +

    { "tooltip.FavoritesAction", "A\u00f1adir a favoritos"}

    ,

    { "tooltip.HomeAction", "Ir a la p\u00E1gina de inicio"}

    ,

// Accessibility names

  • { "access.BackAction", "Bot\u00F3n de anterior"}

    ,

  • { "access.ForwardAction", "Bot\u00F3n de siguiente"}

    ,

  • { "access.HistoryAction", "Bot\u00F3n de historia"}

    ,

  • { "access.PrintAction", "Bot\u00F3n de imprimir"}

    ,
    +

    { "access.BackAction", "Bot\u00F3n Anterior"}

    ,
    +

    { "access.ForwardAction", "Bot\u00F3n Siguiente"}

    ,
    +

    { "access.HistoryAction", "Bot\u00F3n Historial"}

    ,
    +

    { "access.PrintAction", "Bot\u00F3n Imprimir"}

    ,

    { "access.PrintSetupAction", - "Bot\u00F3n de configuraci\u00F3n de p\u00E1gina"}

    ,

  • { "access.ReloadAction", "Bot\u00F3n de recarga"}

    ,

  • { "access.HomeAction", "Bot\u00F3n de inicio"}

    ,

  • { "access.FavoritesAction", "Bot\u00F3n de anadir a favoritos"}

    ,

  • { "access.contentViewer", "Visualizador del contenido"}

    • "Bot\u00F3n Configuraci\u00F3n de p\u00E1gina"},

    { "access.ReloadAction", "Bot\u00F3n Recargar"}

    ,
    +

    { "access.HomeAction", "Bot\u00F3n Inicio"}

    ,
    +

    { "access.FavoritesAction", "Bot\u00F3n A\u00f1adir a favoritos"}

    ,
    +

    { "access.contentViewer", "Visor de contenido"}

};
}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Deque

how to print the last and the first element from a deque in java

Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptions

Our organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOExceptions were generated:

java.io.IOException: Can't store Document
at com.sun.java.help.search.DefaultIndexerKit.storeToken(DefaultIndexerKit.java:164)
at com.sun.java.help.search.DefaultIndexerKit.parseIntoTokens(DefaultIndexerKit.java:117)
at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1092)
at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1064)
at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.handleText(HTMLIndexerKit.java:411)
at javax.swing.text.html.parser.DocumentParser.handleText(DocumentParser.java:241)
at javax.swing.text.html.parser.Parser.handleText(Parser.java:345)
at javax.swing.text.html.parser.Parser.endTag(Parser.java:427)
at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1804)
at javax.swing.text.html.parser.Parser.parseContent(Parser.java:2044)
at javax.swing.text.html.parser.Parser.parse(Parser.java:2211)
at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:105)
at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:73)
at com.sun.java.help.search.HTMLIndexerKit.parse(HTMLIndexerKit.java:116)
at com.sun.java.help.search.Indexer.parseFile(Indexer.java:259)
at com.sun.java.help.search.Indexer.compile(Indexer.java:219)
at com.sun.java.help.search.Indexer.main(Indexer.java:87)

Using the source available from subversion, we've localized the issue to a very subtle bug in com.sun.java.help.search.BitSet.concatenate():

162. int tp = _free - 1; // target
163. int sp = 0; // source
164. do

{ 165. _array[tp++] |= bb._array[sp] >>> (NBits - _avail); 166. _array[tp] = bb._array[sp++] << _avail; 167. }

168. while (sp < bb._free);

This can lead to an ArrayIndexOutOfBoundsException when the _free index for the incoming BitBuffer is outside the bounds of the target BitBuffer. We're not sure how the length of the file affects this result, but we did create the following test case to confirm:

(1) Change the initial array size to 3 (instead of 256, to avoid the need for filling up one buffer with 256 words).
(2) Define a static main method as follows:

public static void main (String[] args)
{
/* Instantiate both buffers. Note that both buffers can contain up to 96 bits (3 words * 32 bits per word) */
BitBuffer target = new BitBuffer(), source = new BitBuffer();

/* Add 8 bits to target – this changes the number of available bits and changes the _free index */
target.append(0xAA, 8);

/* Add 72 bits to source */
source.append(0x11223344, 32);
source.append(0x55667788, 32);
source.append(0x99, 8);

/* Note here that target has enough room to consume all bits in source (72 + 8 < 96),
so the target buffer will not be resized in concatenate () */

/* Flush outstanding bits in both buffers to array */
target.close();
source.close();

/* Invoke concatenate () and take note of the ArrayIndexOutOfBoundsException */
target.concatenate(source);
}

We believe the issue can be fixed by counting the number of remaining bits instead of watching the word pointer in the do-while loop:

162. int tp = _free - 1; // target
163. int sp = 0; // source
164. int remaining = bb.bitCount(); // <-- Begin with all bits in source remaining
165. do {
166. _array[tp++] |= bb._array[sp] >>> (NBits - _avail);
167. remaining = _avail; // <- Deduct bits added to target from remaining
168. if (remaining > 0) // <-- Are there bits remaining after the move?
169.

{ 170. _array[tp] = bb._array[sp++] << _avail; 171. remaining -= NBits - _avail; // <-- Deduct bits added to target 172. }

173. }
174. while (remaining > 0); // Do this while there are bits remaining

We made this change and rebuilt the JavaHelp project, but making this change seems to have led to yet another exception:

java.lang.ArrayIndexOutOfBoundsException: 17
at com.sun.java.help.search.Decompressor.ascendingDecode(Decompressor.java:176)
at com.sun.java.help.search.DocumentLists$MicroIndex.next(DocumentLists.java:105)
at com.sun.java.help.search.DocumentLists$MicroIndex.openDocumentIndex(DocumentLists.java:137)
at com.sun.java.help.search.DocumentLists$MicroIndex.(DocumentLists.java:79)
at com.sun.java.help.search.DocumentLists.(DocumentLists.java:194)
at com.sun.java.help.search.DocumentLists.invert(DocumentLists.java:270)
at com.sun.java.help.search.DefaultIndexBuilder.close(DefaultIndexBuilder.java:130)
at com.sun.java.help.search.Indexer.compile(Indexer.java:242)
at com.sun.java.help.search.Indexer.main(Indexer.java:87)

With this exception, the index is not properly built, and so we rolled back our change in BitBuffer.java.

Is there any way this issue can be fixed? Is there any design documentation that we might use to determine how this library works? The software code itself is very scarcely commented, making it very difficult to compare the intended functionality with the actual behavior.

Environment

n/a

Affected Versions

[current]

Add support for Traditional Chinese translations of UI labels

Summary of Changes: Since the Constants_zh.java appears to have Simplified
Chinese translations, there is no way for the user to get Traditional Chinese
translations of the UI. Adding a Constants_zh_TW.java file gives the user that
option. Even though this file is all in English, giving a user that uses a
locale of "zh_TW" all English text is better than providing Simplified
Chinese. Others may translate this file if they like or I will update it if
our translation center comes back with changes of their own.

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_zh_TW.java
Index: Constants_zh_TW.java

— Constants_zh_TW.java (revision 0)
+++ Constants_zh_TW.java (revision 0)
@@ -0,0 +1,149 @@
+/*

    • @(#)Constants_zh_TW.java
    • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
    • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    • This code is free software; you can redistribute it and/or modify it
    • under the terms of the GNU General Public License version 2 only, as
    • published by the Free Software Foundation. Sun designates this
    • particular file as subject to the "Classpath" exception as provided
    • by Sun in the LICENSE file that accompanied this code.
    • This code is distributed in the hope that it will be useful, but WITHOUT
    • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    • version 2 for more details (a copy is included in the LICENSE file that
    • accompanied this code).
    • You should have received a copy of the GNU General Public License version
    • 2 along with this work; if not, write to the Free Software Foundation,
    • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    • CA 95054 USA or visit www.sun.com if you need additional information or
    • have any questions.
  • /
    +/
    • @(#) Constants_zh_TW.java - last change made 06/27/07
  • */

+package javax.help.resources;
+
+import java.util.ListResourceBundle;
+
+/**

    • Constants used for localizing JavaHelp.
    • These are in the form of key, value.
    • Translators take care to only translate the values.
  • */

+public class Constants_zh_TW extends ListResourceBundle {

  • /**
    • Overrides ListResourceBundle.
  • */
  • public Object[][] getContents() {
  • return new Object[][] {
  • // Constant strings and patterns
  • { "helpset.wrongPublicID",
  • "Unknown PublicID

{0}"},

  • { "helpset.wrongTitle",
  • "Attempting to set title to {0}

but already has value

{1}."},

  • { "helpset.wrongHomeID",
  • "Attempting to set homeID to {0} but already has value {1}

."},

  • { "helpset.subHelpSetTrouble",
  • "Trouble creating subhelpset:

{0}."},

  • { "helpset.malformedURL",
  • "Malformed URL: {0}

."},

  • { "helpset.incorrectURL",
  • "Incorrect URL:

{0}."},

  • { "helpset.wrongText",
  • "{0}

cannot contain text

{1}."},

  • { "helpset.wrongTopLevel",
  • "{0} cannot be a top level tag."},
  • { "helpset.wrongParent",
  • "The parent tag for {0} cannot be {1}

."},

  • { "helpset.unbalanced",
  • "Unbalanced tag

{0}."},

  • { "helpset.wrongLocale",
  • "Warning: xml:lang attribute {0}

conflicts with default

{1}

an
d with default

{2}

"},

  • { "helpset.unknownVersion",
  • "Unknown Version

{0}."},
+

  • // IndexView messages
  • { "index.invalidIndexFormat", + "Warning: Invalid Index format"},
  • { "index.unknownVersion",
  • "Unknown Version {0}

."},
+

  • // TOCView messages
  • { "toc.wrongPublicID",
  • "Unknown PublicID

{0}"},

  • { "toc.invalidTOCFormat", + "Warning: Invalid TOC format"},
  • { "toc.unknownVersion",
  • "Unknown Version {0}

."},
+

  • // FavoritesView messages

{ "favorites.invalidFavoritesFormat", + "Warning: Invalid Favorites format"}

,

  • { "favorites.unknownVersion",
  • "Unknown Version

{0}."},
+

  • // Map messages
  • { "map.wrongPublicID",
  • "Unknown PublicID {0}

"},
+

{ "map.invalidMapFormat", + "Warning: Invalid Map format"}

,

  • { "map.unknownVersion",
  • "Unknown Version

{0}

."},
+

  • // GUI components
  • // Labels

{ "index.findLabel", "Find: "}

,
+
+

{ "search.findLabel", "Find: "}

,
+

{ "search.hitDesc", "Number of occurances in document"}

,
+

{ "search.qualityDesc", "Lowest penality value in document" }

,
+

{ "search.high", "High"}

,
+

{ "search.midhigh", "Medium high"}

,
+

{ "search.mid", "Medium"}

,
+

{ "search.midlow", "Medium low"}

,
+

{ "search.low", "Low"}

,
+
+

{ "favorites.add", "Add"}

,
+

{ "favorites.remove", "Remove"}

,
+

{ "favorites.folder", "New Folder"}

,
+

{ "favorites.name", "Name"}

,
+

{ "favorites.cut", "Cut"}

,
+

{ "favorites.paste", "Paste"}

,
+

{ "favorites.copy" , "Copy"}

,
+
+

{ "history.homePage", "Home page"}

,
+

{ "history.unknownTitle", ""}

,
+

  • // ToolTips for Actions

{ "tooltip.BackAction", "Previous Page"}

,
+

{ "tooltip.ForwardAction", "Next Page"}

,
+

{ "tooltip.PrintAction", "Print"}

,
+

{ "tooltip.PrintSetupAction", "Page Setup"}

,
+

{ "tooltip.ReloadAction", "Reload"}

,
+

{ "tooltip.FavoritesAction", "Add to Favorites"}

,
+

{ "tooltip.HomeAction", "Go to home page"}

,
+

  • // Accessibility names

{ "access.BackAction", "Previous Button"}

,
+

{ "access.ForwardAction", "Next Button"}

,
+

{ "access.HistoryAction", "History Button"}

,
+

{ "access.PrintAction", "Print Button"}

,
+

{ "access.PrintSetupAction", "Page Setup Button"}

,
+

{ "access.ReloadAction", "Reload Button"}

,
+

{ "access.HomeAction", "Home Button"}

,
+

{ "access.FavoritesAction", "Add to Favorites Button"}

,
+

{ "access.contentViewer", "Content Viewer"}

  • };
  • }
    +}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

-db does not work with default temp file loc on Mac OS X

com.sun.java.help.search.Schema.getURL and com.sun.java.help.search.RAFFileFactory.get said to perform improper File <-> URL conversion, producing incorrect results when file names contain + or perhaps other special characters.

Environment

Mac OS X 10.6.8 (javadeveloper_for_mac_os_x_10.6__10m3425.dmg)

[sec] Attacker could load own helpset

javax.help.tagext.ValidateTag allows to provide the url to the hsName by a reqeust parameter, if no hsName is provided in the code an attacker could provide a link to some helpSet he controls and load it into any website.
The request parameter helpset has to be validated before using it.

Back button does not work when using hyperlinks with #id or #name (JavaHelp bug)

javahelp 2.0.05 (latest release)

The "Back button" does not work when using hyperlinks with #id or #name

I found out via debugging the JavaHelp src code that recording history is
currently NOT supported for hrefs containing an #id.

The behaviour of the bug/feature in JavaHelp can also be reproduced with
the delivered idehelp demo

goto
C:\java\jh2.0.05\demos\hsjar\idehelp\idehelp\manager\BeansProject.html

usage of link [1] works with history
usage of link [2] FAILS with history and reproduces the bug/feature

[1]

Beans In Java WorkShop

[2]
Importing Components
(includes importing a JAR File)

link [2] FAILS as it contains a # into the href and this is not recorded in the JavaHelp History.

the source code cannot be compiled

./src/javax/help/HelpSet.java:44: cannot find symbol
symbol : class Parser
location: package com.sun.java.help.impl
import com.sun.java.help.impl.Parser;
^
./src/javax/help/HelpSet.java:45: cannot find symbol
symbol : class ParserListener
location: package com.sun.java.help.impl
import com.sun.java.help.impl.ParserListener;
^
./src/javax/help/HelpSet.java:46: cannot find symbol
symbol : class ParserEvent
location: package com.sun.java.help.impl
import com.sun.java.help.impl.ParserEvent;
^
./src/javax/help/HelpSet.java:47: cannot find symbol
symbol : class Tag
location: package com.sun.java.help.impl
import com.sun.java.help.impl.Tag;
^
./src/javax/help/HelpSet.java:48: cannot find symbol
symbol : class TagProperties
location: package com.sun.java.help.impl
import com.sun.java.help.impl.TagProperties;
^
./src/javax/help/HelpSet.java:49: cannot find symbol
symbol : class XmlReader
location: package com.sun.java.help.impl
import com.sun.java.help.impl.XmlReader;
^
./src/javax/help/HelpSet.java:50: cannot find symbol
...
100 errors

What is the correct way to compile the source code?

Cheers,
Torsten

Environment

Operating System: All
Platform: All

Affected Versions

[current]

CDDL or GPL license?

Hi.
I am helping the Apache incubation process of NetBeans and one of the issues we are solving is JavaHelp license (see this email for example). Apache and GPL licenses don't go well together...

I was thrilled to find out that there is this JavaHelp repository and that the source has been released under CDDL license on Jul 19, 2017. Thank you @pranjal10!

However I'd like to point out that the headers of source files still carry on the old license. I would recommend to fix that as such thing may create confusion, uncertainty and be a reason why JavaEE will not be acceptable for the Eclipse foundation.

Of course I fully understand that the last change made on Jul 19, 2017 outweights the old commits made more than ten years ago and shows the current intention to make JavaHelp available under CDDL license and I plan to act according to that. Should such relicensing not be the Oracle desire (I assume @pranjal10 acts on behalf of Oracle), can you please express that here?

Otherwise I plan to act with a goodwill and release CDDL licensed JavaHelp binary by end of November 2017.

Back button doesn't work properly

javahelp 2.0.05 (latest release)

When I call the javahelp over F1 and than I choose another item from the table of contents, the back button remains disabled. You can reproduce that with idedemo.jar

Affected Versions

[current]

NullPointerException on javax.help.MergeHelpUtilities.mergeNodeChildren()

java.lang.NullPointerException
at javax.help.MergeHelpUtilities.mergeNodeChildren(MergeHelpUtilities.java:89)
at javax.help.plaf.basic.BasicTOCNavigatorUI.loadData(BasicTOCNavigatorUI.java:218)
at javax.help.plaf.basic.BasicTOCNavigatorUI.access$000(BasicTOCNavigatorUI.java:75)
at javax.help.plaf.basic.BasicTOCNavigatorUI$NavSwingWorker.construct(BasicTOCNavigatorUI.java:262)
at com.sun.java.help.impl.SwingWorker$2.run(SwingWorker.java:139)
at java.lang.Thread.run(Thread.java:595)

Affected Versions

[current]

Can't build with Java 8 or later

Trying to build this library using Java 8 or 10, Ant fails with the following error.

-do-compile:
    [mkdir] Created dir: /build/javahelp2/src/javahelp2/javahelp_nbproject/build/empty
    [javac] Compiling 137 source files to /build/javahelp2/src/javahelp2/javahelp_nbproject/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.4
    [javac] error: Source option 1.4 is no longer supported. Use 6 or later.
    [javac] error: Target option 1.4 is no longer supported. Use 1.6 or later.

Brazilian Portuguese Constants

Hello! I´m sending the Java Help Brazilian Portuguese Constants.

I downloaded the development version at
https://javahelp.dev.java.net/files/documents/5985/47404/javahelp2-src-2.0.02_svn46.zip,
included the new class file, regenerated the jars (inside NetBeans, using
release Ant target) and made a simple test. Everything seems working fine.

Constants_pt_BR.java

package javax.help.resources;

import java.util.ListResourceBundle;

/**

  • Constants used for localizing JavaHelp.
    *
  • These are in the form of key, value.
  • Translators take care to only translate the values.
    */

public class Constants_pt_BR extends ListResourceBundle {
/**

  • Overrides ListResourceBundle.
    */
    public Object[][] getContents() {
    return new Object[][] {

// Constant strings and patterns
{ "helpset.wrongPublicID",
"PublicID

{0} desconhecido"},
{ "helpset.wrongTitle",
"Tentando atribuir t\u00EDtulo para {0}

mas j\u00E1 existe o valor

{1}."},
{ "helpset.wrongHomeID",
"Tentando atribuir homeID para {0} mas j\u00E1 existe o valor {1}

."},
{ "helpset.subHelpSetTrouble",
"Problemas criando subhelpset:

{0}."},
{ "helpset.malformedURL",
"URL malformada: {0}

."},
{ "helpset.incorrectURL",
"URL incorreta:

{0}."},
{ "helpset.wrongText",
"{0}

n\u00A3o o pode conter o texto

{1}."},
{ "helpset.wrongTopLevel",
"{0} n\u00A3o pode ser uma tag de n\u00EDvel superior."},
{ "helpset.wrongParent",
"A tag pai de {0} n\u00A3o pode ser {1}

."},
{ "helpset.unbalanced",
"Tag

{0} n\u00A3o finalizada."},
{ "helpset.wrongLocale",
"Aviso: atributo xml:lang {0}

em conflito com default

{1}

e com default

{2}

"},
{ "helpset.unknownVersion",
"Vers\u00A3o Desconhecida

{0}."},

// IndexView messages
{ "index.invalidIndexFormat", "Aviso: Formato de \u00CDndice incorreto"},
{ "index.unknownVersion",
"Vers\u00A3o Desconhecida {0}

."},

// TOCView messages
{ "toc.wrongPublicID",
"PublicID

{0} desconhecido"},
{ "toc.invalidTOCFormat", "Aviso: Formato de TOC incorreto"},
{ "toc.unknownVersion",
"Vers\u00A3o Desconhecida {0}

."},

// FavoritesView messages

{ "favorites.invalidFavoritesFormat", "Aviso: Formato de Favoritos incorreto"}

,
{ "favorites.unknownVersion",
"Vers\u00A3o Desconhecida

{0}."},

// Map messages
{ "map.wrongPublicID",
"PublicID {0}

desconhecido"},

{ "map.invalidMapFormat", "Aviso: Formato de Map incorreto"}

,
{ "map.unknownVersion",
"Vers\u00A3o Desconhecida

{0}

."},

// GUI components
// Labels

{ "index.findLabel", "Localizar: "}

,

{ "search.findLabel", "Localizar: "}

,

{ "search.hitDesc", "N\u00FAmero de ocorr\u00EAncias no documento"}

,

{ "search.qualityDesc", "O mais baixo valor de penalidade no documento" }

,

{ "search.high", "Alto"}

,

{ "search.midhigh", "M\u00E9dio-alto"}

,

{ "search.mid", "M\u00E9dio"}

,

{ "search.midlow", "M\u00E9dio-baixo"}

,

{ "search.low", "Baixo"}

,

{ "favorites.add", "Adicionar"}

,

{ "favorites.remove", "Excluir"}

,

{ "favorites.folder", "Nova Pasta"}

,

{ "favorites.name", "Nome"}

,

{ "favorites.cut", "Recortar"}

,

{ "favorites.paste", "Colar"}

,

{ "favorites.copy" , "Copiar"}

,

{ "history.homePage", "P\u00E1gina Inicial"}

,

{ "history.unknownTitle", "<T\u00EDtulo da P\u00E1gina Desconhecido>"}

,

// ToolTips for Actions

{ "tooltip.BackAction", "P\u00E1gina Anterior"}

,

{ "tooltip.ForwardAction", "Pr\u00F3xima P\u00E1gina"}

,

{ "tooltip.PrintAction", "Imprimir"}

,

{ "tooltip.PrintSetupAction", "Configurar P\u00E1gina"}

,

{ "tooltip.ReloadAction", "Atualizar"}

,

{ "tooltip.FavoritesAction", "Adicionar aos Favoritos"}

,

{ "tooltip.HomeAction", "P\u00E1gina Inicial"}

,

// Accessibility names

{ "access.BackAction", "Bot\u00A3o Anterior"}

,

{ "access.ForwardAction", "Bot\u00A3o Pr\u00F3ximo"}

,

{ "access.HistoryAction", "Bot\u00A3o de Hist\u00F3rico"}

,

{ "access.PrintAction", "Bot\u00A3o Imprimir"}

,

{ "access.PrintSetupAction", "Bot\u00A3o Configura\u00E7\u00A3o de P\u00E1gina"}

,

{ "access.ReloadAction", "Bot\u00A3o de Atualiza\u00E7\u00A3o"}

,

{ "access.HomeAction", "Bot\u00A3o P\u00E1gina Inicial"}

,

{ "access.FavoritesAction", "Bot\u00A3o Adicionar a Favoritos"}

,

{ "access.contentViewer", "Visualizar Conte\u00FAdo"}

};
}
}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Add missing property and correct exisiting properties for Constants_fr.java

Summary of Changes: Added missing "tooltip.FavoritesAction" property and
corrected "index.findLabel" and "search.findLabel"

Added "tooltip.FavoritesAction" but text is in English, I could possibly update
the text with translated text in the coming weeks if our translation center
gets back to me in time. I also updated "index.findLabel"
and "search.findLabel" based on previous conversations with our translation
center. Thank you!

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_fr.java
Index: Constants_fr.java

— Constants_fr.java (revision 52)
+++ Constants_fr.java (working copy)
@@ -1,25 +1,25 @@
/*

  • @(#)Constants_fr.java 1.10 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    @@ -57,7 +57,7 @@
    "Probl\u00e8me lors de la cr\u00e9ation de l''ensemble de sous
    -aide : {0}."},
    { "helpset.malformedURL",
    "URL mal form\u00e9 : {0}

    ."},

  • { "helpset.incorrectURL",
    +Unknown macro: { "helpset.incorrectURL", "URL incorrect }

    ,
    @@ -102,12 +102,11 @@

// GUI components
// Labels

  • { "index.findLabel", "Trouver : "}

    ,
    +

    { "index.findLabel", "Rechercher: "}

    ,

  • { "search.findLabel", "Trouver : "}

    ,
    +

    { "search.findLabel", "Rechercher: "}

    ,

    { "search.hitDesc", "Nombre d'apparitions dans le document"}

    ,

  • { "search.qualityDesc", "Valeur de p\u00e9nalit\u00e9 la plus basse du document" -}

    ,
    +

    { "search.qualityDesc", "Valeur de p\u00e9nalit\u00e9 la plus basse du document"}

    ,

    { "search.high", "Haut"}

    ,

    { "search.midhigh", "Moyen haut"}

    ,

    { "search.mid", "Moyen"}

    ,
    @@ -131,7 +130,8 @@

    { "tooltip.PrintAction", "Imprimer"}

    ,

    { "tooltip.PrintSetupAction", "Mise en page"}

    ,

    { "tooltip.ReloadAction", "Recharger"}

    ,

  • { "tooltip.HomeAction", "Vers page ded\u00e9marrage"},

    • { "tooltip.FavoritesAction", "Add to Favorites"},
    • { "tooltip.HomeAction", "Vers page dedu00e9marrage"}

    ,

// Accessibility names

{ "access.BackAction", "Bouton Pr\00e9c\00e9dent"}

,

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Read JavaHelp resources not over http(s)

When using JavaHelp for a web help page it fetches the the *.hs file over http or https. When using https without the certificate being in the Java trust store we get an error message from the server, not the web browser, that the ssl certificate is not trusted and the help page is not show.

The attached patch makes it possible for JavaHelp to fetch the *.hs file for internal usage from the filesystem and not via http(s).
With this patch we do not have any problems using JavaHelp on a https side where the ssl certificate is not in the Java trust store of the server.

With this patch you can also specify helpSetNameLocal:

<jh:validate helpBroker="<%= helpBroker %>"
helpSetName='<%= request.getContextPath()"/helpset/WebAdmin_"+language".hs" %>'
helpSetNameLocal='<%= "/helpset/WebAdmin_"language".hs" %>' />

This patch is based on current version r89 from https://svn.java.net/svn/javahelp~svn/trunk .

bremen online services GmbH & Co. KG would like to see this patch in an official version of JavaHelp.

Add support for Korean translations of UI labels

Please add support for Korean translations for the UI labels and tooltips.
This will address the bug listed in http://bugs.sun.com/bugdatabase/view_bug.do?
bug_id=6298389.

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_ko.java
Index: Constants_ko.java

— Constants_ko.java (revision 0)
+++ Constants_ko.java (revision 0)
@@ -0,0 +1,149 @@
+/*

    • @(#)Constants_ko.java 1.22 06/10/30
    • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
    • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    • This code is free software; you can redistribute it and/or modify it
    • under the terms of the GNU General Public License version 2 only, as
    • published by the Free Software Foundation. Sun designates this
    • particular file as subject to the "Classpath" exception as provided
    • by Sun in the LICENSE file that accompanied this code.
    • This code is distributed in the hope that it will be useful, but WITHOUT
    • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    • version 2 for more details (a copy is included in the LICENSE file that
    • accompanied this code).
    • You should have received a copy of the GNU General Public License version
    • 2 along with this work; if not, write to the Free Software Foundation,
    • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    • CA 95054 USA or visit www.sun.com if you need additional information or
    • have any questions.
  • /
    +/
    • @(#) Constants_ko.java 1.22 - last change made 10/30/06
  • */

+package javax.help.resources;
+
+import java.util.ListResourceBundle;
+
+/**

    • Constants used for localizing JavaHelp.
    • These are in the form of key, value.
    • Translators take care to only translate the values.
  • */

+public class Constants_ko extends ListResourceBundle {

  • /**
    • Overrides ListResourceBundle.
  • */
  • public Object[][] getContents() {
  • return new Object[][] {
  • // Constant strings and patterns
  • { "helpset.wrongPublicID",
  • "\uc54c \uc218 \uc5c6\ub294 PublicID

{0}"},

  • { "helpset.wrongTitle",
  • "{0}

\uc5d0 \uc81c\ubaa9\uc744 \uc124\uc815\ud558\ub824\uace0
ud588\uc9c0\ub9cc, \uac12

{1}\uc774(\uac00) \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c
8\ub2e4."},

  • { "helpset.wrongHomeID",
  • "{0}\uc5d0 homeID\ub97c \uc124\uc815\ud558\ub824\uace0 \ud588
    uc9c0\ub9cc, \uac12 {1}

\uc774(\uac00) \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e
4."},

  • { "helpset.subHelpSetTrouble",
  • "\ud558\uc704 \ub3c4\uc6c0\ub9d0 \uc124\uc815:

{0}\uc744(\ub97
c) \uc0dd\uc131\ud558\ub294 \ub370 \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\u
b2c8\ub2e4."},

  • { "helpset.malformedURL",
  • "URL: {0}

\uc758 \ud615\uc2dd\uc774 \uc62c\ubc14\ub974\uc9c0 \u
c54a\uc2b5\ub2c8\ub2e4."},

  • { "helpset.incorrectURL",
  • "URL:

{0}\uc774(\uac00) \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5
ub2c8\ub2e4."},

  • { "helpset.wrongText",
  • "{0}

\uc740(\ub294) \ud14d\uc2a4\ud2b8

{1}\uc744(\ub97c) \ud3ec
\ud568\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},

  • { "helpset.wrongTopLevel",
  • "{0}\uc740(\ub294) \uc0c1\uc704 \ub808\ubca8 \ud0dc\uadf8\uc77
    c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
  • { "helpset.wrongParent",
  • "{0}\uc758 \uc0c1\uc704 \ud0dc\uadf8\ub294 {1}

\uc77c \uc218 \u
c5c6\uc2b5\ub2c8\ub2e4."},

  • { "helpset.unbalanced",
  • "\ud0dc\uadf8

{0}\uc758 \uade0\ud615\uc774 \ub9de\uc9c0 \uc54a
\uc2b5\ub2c8\ub2e4."},

  • { "helpset.wrongLocale",
  • "\uacbd\uace0: xml:lang \uc18d\uc131 {0}

\uc740(\ub294) \uae30
ubcf8\uac12

{1}

\uc640(\uacfc)

{2}

\uc0ac\uc774\uc5d0\uc11c \ucda9\ub3cc\ud569\ub
2c8\ub2e4"},

  • { "helpset.unknownVersion",
  • "\ubc84\uc804

{0}\uc744(\ub97c) \uc54c \uc218 \uc5c6\uc2b5\ub2
c8\ub2e4."},
+

  • // IndexView messages
  • { "index.invalidIndexFormat", + "\uacbd\uace0: \uc798\ubabb\ub41c \uc778\ub371\uc2a4 \ucd9c\ub 825\ud615\uc2dd"},
  • { "index.unknownVersion",
  • "\ubc84\uc804 {0}

\uc744(\ub97c) \uc54c \uc218 \uc5c6\uc2b5\ub2
c8\ub2e4."},
+

  • // TOCView messages
  • { "toc.wrongPublicID",
  • "\uc54c \uc218 \uc5c6\ub294 PublicID

{0}"},

  • { "toc.invalidTOCFormat", + "\uacbd\uace0: \uc798\ubabb\ub41c TOC \ucd9c\ub825\ud615\uc2dd "},
  • { "toc.unknownVersion",
  • "\ubc84\uc804 {0}

\uc744(\ub97c) \uc54c \uc218 \uc5c6\uc2b5\ub2
c8\ub2e4."},
+

  • // FavoritesView messages

{ "favorites.invalidFavoritesFormat", + "\uacbd\uace0: \uc798\ubabb\ub41c \uc990\uaca8\ucc3e\uae30 \uc d9c\ub825\ud615\uc2dd"}

,

  • { "favorites.unknownVersion",
  • "\ubc84\uc804

{0}\uc744(\ub97c) \uc54c \uc218 \uc5c6\uc2b5\ub2
c8\ub2e4."},
+

  • // Map messages
  • { "map.wrongPublicID",
  • "\uc54c \uc218 \uc5c6\ub294 PublicID {0}

"},
+

{ "map.invalidMapFormat", + "\uacbd\uace0: \uc798\ubabb\ub41c Map \ucd9c\ub825\ud615\uc2dd "}

,

  • { "map.unknownVersion",
  • "\ubc84\uc804

{0}

\uc744(\ub97c) \uc54c \uc218 \uc5c6\uc2b5\ub2
c8\ub2e4."},
+

  • // GUI components
  • // Labels

{ "index.findLabel", "\ucc3e\uae30: "}

,
+
+

{ "search.findLabel", "\ucc3e\uae30: "}

,
+

{ "search.hitDesc", "\ubb38\uc11c\uc758 \ubc1c\uc0dd \uac1c\uc218"}

,

{ "search.qualityDesc", "\ubb38\uc11c\uc758 \ucd5c\ud558\uc704 \uc70 4\ubc18\uac12" }

,
+

{ "search.high", "\ub192\uc74c"}

,
+

{ "search.midhigh", "\uc57d\uac04 \ub192\uc74c"}

,
+

{ "search.mid", "\uc911\uac04"}

,
+

{ "search.midlow", "\uc57d\uac04 \ub0ae\uc74c"}

,
+

{ "search.low", "\ub0ae\uc74c"}

,
+
+

{ "favorites.add", "\ucd94\uac00"}

,
+

{ "favorites.remove", "\uc81c\uac70"}

,
+

{ "favorites.folder", "\uc0c8\ub85c\uc6b4 \ud3f4\ub354"}

,
+

{ "favorites.name", "\uc774\ub984"}

,
+

{ "favorites.cut", "\uc790\ub974\uae30"}

,
+

{ "favorites.paste", "\ubd99\uc5ec\ub123\uae30"}

,
+

{ "favorites.copy" , "\ubcf5\uc0ac"}

,
+
+

{ "history.homePage", "\ud648\ud398\uc774\uc9c0"}

,
+

{ "history.unknownTitle", "<\uc54c \uc218 \uc5c6\ub294 \ud398\uc774 \uc9c0 \uc81c\ubaa9>"}

,
+

  • // ToolTips for Actions

{ "tooltip.BackAction", "\uc774\uc804 \ud398\uc774\uc9c0"}

,
+

{ "tooltip.ForwardAction", "\ub2e4\uc74c \ud398\uc774\uc9c0"}

,
+

{ "tooltip.PrintAction", "\uc778\uc1c4"}

,
+

{ "tooltip.PrintSetupAction", "\ud398\uc774\uc9c0 \uc124\uc815"}

,
+

{ "tooltip.ReloadAction", "\ub2e4\uc2dc \ubd88\ub7ec\uc624\uae30"}

,
+

{ "tooltip.FavoritesAction", "\uc990\uaca8\ucc3e\uae30\uc5d0 \ucd94 \uac00"}

,
+

{ "tooltip.HomeAction", "\ud648\ud398\uc774\uc9c0\ub85c \uc774\ub3d 9"}

,
+

  • // Accessibility names

{ "access.BackAction", "\uc774\uc804 \ubc84\ud2bc"}

,
+

{ "access.ForwardAction", "\ub2e4\uc74c \ubc84\ud2bc"}

,
+

{ "access.HistoryAction", "\ud788\uc2a4\ud1a0\ub9ac \ubc84\ud2bc"}

,
+

{ "access.PrintAction", "\uc778\uc1c4 \ubc84\ud2bc"}

,
+

{ "access.PrintSetupAction", "\ud398\uc774\uc9c0 \uc124\uc815 \ubc84 \ud2bc"}

,
+

{ "access.ReloadAction", "\ub2e4\uc2dc \ubd88\ub7ec\uc6b0\uae30 \ubc 84\ud2bc"}

,
+

{ "access.HomeAction", "\ud648 \ubc84\ud2bc"}

,
+

{ "access.FavoritesAction", "\uc990\uaca8\ucc3e\uae30\uc5d0 \ucd94\ uac00 \ubc84\ud2bc"}

,
+

{ "access.contentViewer", "\ucee8\ud150\uce20 \ubdf0\uc5b4"}

  • };
  • }
    +}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

API leaks non-public class

I've executed Sun's sigtest on javahelp APIs and I got this report:

Hidden class found: javax.help.HelpSetFactory in method public static
javax.help.HelpSet
javax.help.HelpSet.parse(java.net.URL,java.lang.ClassLoader,javax.help.HelpSetFactory)
in class javax.help.HelpSet

Hidden class found: javax.help.HelpSetFactory in method public void
javax.help.HelpSet.parseInto(java.net.URL,javax.help.HelpSetFactory) in class
javax.help.HelpSet

I believe public class HelpSet should not refer to non-public class
HelpSetFactory. Either make the above methods package private, or make
HelpSetFactory public.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Having a double quote (escaped) in the tocitem/@text attribute breaks TOC panel loading in the Help Panel

Version is 2.0_02.

When having a title that ends in a double quote, then the TOC is not loaded, because of:

Parsing failed for jar:file:/D:/programs/Oxygen%20XML%20Editor%2018/lib/editorHelp.jar!/toc.xml
<tocitem text="When Started, Windows Service Reports "Error 1067: Process Terminated Unexpectedly""
           target="windows-service-reports-error-1067"/>
Exception in thread "Thread-3" java.lang.NullPointerException
        at javax.help.MergeHelpUtilities.mergeNodeChildren(MergeHelpUtilities.java:81)
        at javax.help.plaf.basic.BasicTOCNavigatorUI.loadData(BasicTOCNavigatorUI.java:208)
        at javax.help.plaf.basic.BasicTOCNavigatorUI.access$000(BasicTOCNavigatorUI.java:65)
        at javax.help.plaf.basic.BasicTOCNavigatorUI$NavSwingWorker.construct(BasicTOCNavigatorUI.java:252)
        at com.sun.java.help.impl.SwingWorker$2.run(SwingWorker.java:129)
        at java.lang.Thread.run(Unknown Source)

The toc.xml file is wellformed and has the content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toc
  PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd"> <toc version="2.0">
   <tocitem text="Test">
      <tocitem text="When Started, Windows Service Reports &#34;Error 1067: Process Terminated Unexpectedly&#34;"
               target="service">
         ...
      </tocitem>
   </tocitem>
</toc>

IllegalArgumentException from MergingSearchEngine.merge(MergingSearchEngine.java:91)

Random issue. No single scenarion how to reproduce. We have 15 reports about it.
It happens when we call constructor JHelp(HelpSet) ie. when Help window is
opened for the first time and JHelp instance is created. Original report is at
http://www.netbeans.org/issues/show_bug.cgi?id=127368. List of duplicates is at
http://statistics.netbeans.org/analytics/detail.do?id=3169.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Add support for Italian translations of UI labels

Summary of Additions: Add support for Italian translation of UI labels and
tooltips

More translated text could be added in the future. I will update the issue if
I get any additions/changes from our translation center. Thank you!

This enhancement is briefly mentioned in BugId: 6298389 -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6298389

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_it.java
Index: Constants_it.java

— Constants_it.java (revision 0)
+++ Constants_it.java (revision 0)
@@ -0,0 +1,148 @@
+/*

    • @(#)Constants_it.java
    • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
    • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    • This code is free software; you can redistribute it and/or modify it
    • under the terms of the GNU General Public License version 2 only, as
    • published by the Free Software Foundation. Sun designates this
    • particular file as subject to the "Classpath" exception as provided
    • by Sun in the LICENSE file that accompanied this code.
    • This code is distributed in the hope that it will be useful, but WITHOUT
    • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    • version 2 for more details (a copy is included in the LICENSE file that
    • accompanied this code).
    • You should have received a copy of the GNU General Public License version
    • 2 along with this work; if not, write to the Free Software Foundation,
    • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    • CA 95054 USA or visit www.sun.com if you need additional information or
    • have any questions.
  • /
    +/
    • @(#) Constants_it.java - last change made 06/27/07
  • */

+package javax.help.resources;
+
+import java.util.ListResourceBundle;
+
+/**

    • Constants used for localizing JavaHelp.
    • These are in the form of key, value.
    • Translators take care to only translate the values.
  • */

+public class Constants_it extends ListResourceBundle {

  • /**
    • Overrides ListResourceBundle.
  • */
  • public Object[][] getContents() {
  • return new Object[][] {
  • // Constant strings and patterns
  • { "helpset.wrongPublicID",
  • "Unknown PublicID

{0}"},

  • { "helpset.wrongTitle",
  • "Attempting to set title to {0}

but already has value

{1}."},

  • { "helpset.wrongHomeID",
  • "Attempting to set homeID to {0} but already has value {1}

."},

  • { "helpset.subHelpSetTrouble",
  • "Trouble creating subhelpset:

{0}."},

  • { "helpset.malformedURL",
  • "Malformed URL: {0}

."},

  • { "helpset.incorrectURL",
  • "Incorrect URL:

{0}."},

  • { "helpset.wrongText",
  • "{0}

cannot contain text

{1}."},

  • { "helpset.wrongTopLevel",
  • "{0} cannot be a top level tag."},
  • { "helpset.wrongParent",
  • "The parent tag for {0} cannot be {1}

."},

  • { "helpset.unbalanced",
  • "Unbalanced tag

{0}."},

  • { "helpset.wrongLocale",
  • "Warning: xml:lang attribute {0}

conflicts with default

{1}

an
d with default

{2}

"},

  • { "helpset.unknownVersion",
  • "Unknown Version

{0}."},
+

  • // IndexView messages
  • { "index.invalidIndexFormat", + "Warning: Invalid Index format"},
  • { "index.unknownVersion",
  • "Unknown Version {0}

."},
+

  • // TOCView messages
  • { "toc.wrongPublicID",
  • "Unknown PublicID

{0}"},

  • { "toc.invalidTOCFormat", + "Warning: Invalid TOC format"},
  • { "toc.unknownVersion",
  • "Unknown Version {0}

."},
+

  • // FavoritesView messages

{ "favorites.invalidFavoritesFormat", + "Warning: Invalid Favorites format"}

,

  • { "favorites.unknownVersion",
  • "Unknown Version

{0}."},
+

  • // Map messages
  • { "map.wrongPublicID",
  • "Unknown PublicID {0}

"},
+

{ "map.invalidMapFormat", + "Warning: Invalid Map format"}

,

  • { "map.unknownVersion",
  • "Unknown Version

{0}

."},
+

  • // GUI components
  • // Labels

{ "index.findLabel", "Trova: "}

,
+

{ "search.findLabel", "Trova: "}

,
+

{ "search.hitDesc", "Number of occurances in document"}

,
+

{ "search.qualityDesc", "Lowest penality value in document" }

,
+

{ "search.high", "High"}

,
+

{ "search.midhigh", "Medium high"}

,
+

{ "search.mid", "Medium"}

,
+

{ "search.midlow", "Medium low"}

,
+

{ "search.low", "Low"}

,
+
+

{ "favorites.add", "Add"}

,
+

{ "favorites.remove", "Remove"}

,
+

{ "favorites.folder", "New Folder"}

,
+

{ "favorites.name", "Name"}

,
+

{ "favorites.cut", "Cut"}

,
+

{ "favorites.paste", "Paste"}

,
+

{ "favorites.copy" , "Copy"}

,
+
+

{ "history.homePage", "Home page"}

,
+

{ "history.unknownTitle", ""}

,
+

  • // ToolTips for Actions

{ "tooltip.BackAction", "Precedente"}

,
+

{ "tooltip.ForwardAction", "Successivo"}

,
+

{ "tooltip.PrintAction", "Stampa"}

,
+

{ "tooltip.PrintSetupAction", "Imposta pagina"}

,
+

{ "tooltip.ReloadAction", "Ricarica"}

,
+

{ "tooltip.FavoritesAction", "Add to Favorites"}

,
+

{ "tooltip.HomeAction", "Go to home page"}

,
+

  • // Accessibility names

{ "access.BackAction", "Previous Button"}

,
+

{ "access.ForwardAction", "Next Button"}

,
+

{ "access.HistoryAction", "History Button"}

,
+

{ "access.PrintAction", "Print Button"}

,
+

{ "access.PrintSetupAction", "Page Setup Button"}

,
+

{ "access.ReloadAction", "Reload Button"}

,
+

{ "access.HomeAction", "Home Button"}

,
+

{ "access.FavoritesAction", "Add to Favorites Button"}

,
+

{ "access.contentViewer", "Content Viewer"}

  • };
  • }
    +}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Flag JEditorPane.W3C_LENGTH_UNITS

With the flag JEditorPane.W3C_LENGTH_UNITS the JEditorPane can show HTML more
like the browser. Please add this flag also to JavaHelp or make it to default in
JavaHelp.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Can't download source releases

There's no way to download source tarballs - the downloads section is empty. The latest release as well as all past releases have disappeared.

Updates and additions to properties for Constants_zh.java

Summary of Changes: Change the "tooltip.NextAction" property
to "tooltip.ForwardAction" since it is the correct property name;
Added "tooltip.FavoritesAction" since it was missing

The changes in this patch address the "zh" locale problems noted in "BugId:
6467214 - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6467214".
The "ja" locale problems noted in that bug are covered by 6205360. This patch
also addresses the problem noted in "BugId: 6296150 -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6296150". It does not
however address any of the changes mentioned in the "Evaluation" section for
6296150.

Further updates could occur to this issue if our localization center gets
translated text or corrections back to me in time. Thank you!

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_zh.java
Index: Constants_zh.java

— Constants_zh.java (revision 52)
+++ Constants_zh.java (working copy)
@@ -1,25 +1,25 @@
/*

  • @(#)Constants_zh.java 1.6 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    @@ -126,11 +126,12 @@

// ToolTips for Action

{ "tooltip.BackAction", "\u4e0a\u4e00\u9875"}

,

  • { "tooltip.NextAction", "\u4e0b\u4e00\u9875"}

    ,
    +

    { "tooltip.ForwardAction", "\u4e0b\u4e00\u9875"}

    ,

    { "tooltip.PrintAction", "\u6253\u5370"}

    ,

    { "tooltip.PrintSetupAction", "\u9875\u8bbe\u7f6e"}

    ,

    { "tooltip.ReloadAction", "\u91cd\u65b0\u88c5\u8f7d"}

    ,

  • { "tooltip.HomeAction", "Go to home page"},

    • { "tooltip.FavoritesAction", "Add to Favorites"},
    • { "tooltip.HomeAction", "Go to home page"}

    ,

// Accessibility names

{ "access.BackAction", "Previous Button"}

,

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Add tooltip.FavoritesAction to Constants_ru.java

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_ru.java
Index: Constants_ru.java

— Constants_ru.java (revision 52)
+++ Constants_ru.java (working copy)
@@ -1,25 +1,25 @@
/*

  • @(#)Constants_ru.java 1.8 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    @@ -113,7 +113,7 @@
    { "search.mid", "Medium"}

    ,

    { "search.midlow", "Medium low"}

    ,

    { "search.low", "Low"}

    ,

    { "favorites.add", "Add"}

    ,

    { "favorites.remove", "Remove"}

    ,

    { "favorites.folder", "New Folder"}

    ,
    @@ -131,6 +131,7 @@

    { "tooltip.PrintAction", "\u043f\u0435\u0447\u0430\u0442\u044c"}

    ,

    { "tooltip.PrintSetupAction", "\u043f\u0430\u0440\u0430\u043c\u0435\ u0442\u0440\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"}

    ,

    { "tooltip.ReloadAction", "\u043e\u0431\u043d\u043e\u0432\u0438\u04 42\u044c"}

    ,
    +

    { "tooltip.FavoritesAction", "Add to Favorites"}

    ,

    { "tooltip.HomeAction", "Go to home page"}

    ,

// Accessibility names

Sorry for the extra marked changes, my editor must have converted the newlines
or something. Only real change is the addition of "tooltip.FavoritesAction".
I could possibly update the issue in the coming weeks with actual localized
text if our translation center gets to it in time. I wanted to go ahead and
get the issue entered though. Thank you!

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Add missing properties and correct BackAction property for Constants_ja.java

Summary of Changes: Corrected the "tooltip.BactionAction"
to "tooltip.BackAction"; Added missing properties; Changed translated comments
back to English

More changes could be possible if our translation center gets back to me within
the next couple of weeks and I'll update the issue then

Addresses the rest of "BugId: 6205360 -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6205360" by
correcting "tooltip.BactionAction" to "tooltip.BackAction".

Doesn't neccessairly correct the "BugId: 6287873 -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6287873" unless our
translation center comes back with fixes for those. But just wanted to mention
that bug for reference and others if they would like to correct the file.

C:\JavaHelp\Open_Source\Subversion\Projects\JavaHelp\javahelp\jhMaster\JavaHelp
src\new\javax\help\resources>svn diff Constants_ja.java
Index: Constants_ja.java

— Constants_ja.java (revision 52)
+++ Constants_ja.java (working copy)
@@ -1,25 +1,25 @@
/*

  • @(#)Constants_ja.java 1.10 06/10/30

  • Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.

  • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  • This code is free software; you can redistribute it and/or modify it

  • under the terms of the GNU General Public License version 2 only, as

  • published by the Free Software Foundation. Sun designates this

  • particular file as subject to the "Classpath" exception as provided

  • by Sun in the LICENSE file that accompanied this code.

  • This code is distributed in the hope that it will be useful, but WITHOUT

  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License

  • version 2 for more details (a copy is included in the LICENSE file that

  • accompanied this code).

  • You should have received a copy of the GNU General Public License version

  • 2 along with this work; if not, write to the Free Software Foundation,

  • Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

  • Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,

  • CA 95054 USA or visit www.sun.com if you need additional information or

  • have any questions.
    @@ -33,21 +33,23 @@
    import java.util.ListResourceBundle;

/**

    • \u5b9a\u6570\u306f\u3001JavaHelp \u3092\u30ed\u30fc\u30ab\u30e9\u30a4\u30ba
      u3059\u308b\u306e\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002
      • Constants used for localizing JavaHelp.
    • \u5b9a\u6570\u306f\u3001\u30ad\u30fc\u3001\u5024\u306e\u5f62\u3067\u793a\u30
      55\u308c\u307e\u3059\u3002
    • \u5024\u3060\u3051\u3092\u7ffb\u8a33\u3057\u307e\u3059\u3002
      • These are in the form of key, value.
      • Translators take care to only translate the values.
        */

public class Constants_ja extends ListResourceBundle {
/**

    • ListResourceBundle \u3092\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002
      • Overrides ListResourceBundle.
        */
        public Object[][] getContents() {
        return new Object[][] {
  • // \u5b9a\u6570\u6587\u5b57\u5217\u3068\u30d1\u30bf\u30fc\u30f3

  • { "helpset.wrongTitle",

    • // Constant strings and patterns
      +Unknown macro: { "helpset.wrongPublicID",+ "Unknown PublicID {0}"},
    • { "helpset.wrongTitle",
      "\u30bf\u30a4\u30c8\u30eb\u3092 {0} u306bu8a2du5b9au3057u3088u3046u3068u3057u307eu3057u305fu304cu3001u3059u3067u306bu5024 {1}
      \u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002"},
      { "helpset.wrongHomeID",
      "homeID \u3092 {0} \u306b\u8a2d\u5b9a\u3057\u3088\u3046\u3068
      u3057\u307e\u3057\u305f\u304c\u3001\u3059\u3067\u306b\u5024 {1} u304cu5b58u5728u3057u3066u3044u307eu3059u3002"}

    ,
    @@ -67,15 +69,39 @@
    "\u30bf\u30b0

    {0} \u306f\u9589\u3058\u3066\u3044\u307e\u305b\u
    3093\u3002"},
    { "helpset.wrongLocale",
    "\u8b66\u544a: xml: \u8a00\u8a9e\u5c5e\u6027 {0}

    \u306f\u3001
    u30c7\u30d5\u30a9\u30eb\u30c8\u306e

    {1}

    \u304a\u3088\u3073

    {2}

    \u3068\u91cd\u890
    7\u3057\u307e\u3059\u3002"},
    +

    Unknown macro: { "helpset.unknownVersion",+ "Unknown Version {0}."},

    • // IndexView messages
      { "index.invalidIndexFormat", "\u8b66\u544a: \u7d22\u5f15\u306e\u30d5\u30a9\u30fc\u30de\u30c 3\u30c8\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002"},
    • { "index.unknownVersion",
    • "Unknown Version {0}."}

    ,

  • { "toc.invalidTOCFormat",

    • // TOCView messages
      +Unknown macro: { "toc.wrongPublicID",+ "Unknown PublicID {0}"},
    • { "toc.invalidTOCFormat", "\u8b66\u544a: \u76ee\u6b21\u306e\u30d5\u30a9\u30fc\u30de\u30c 3\u30c8\u304c\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002"},
    • { "toc.unknownVersion",
    • "Unknown Version {0}."}

    ,

  • // GUI \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8

  • // \u30e9\u30d9\u30eb

    • // FavoritesView messages
    • { "favorites.invalidFavoritesFormat", + "Warning: Invalid Favorites format"}

    ,
    +

    Unknown macro: { "favorites.unknownVersion",+ "Unknown Version {0}."},
    +

    • // Map messages
    • { "map.wrongPublicID",
    • "Unknown PublicID {0}"}

    ,
    +

    { "map.invalidMapFormat", + "Warning: Invalid Map format"}

    ,
    +

    Unknown macro: { "map.unknownVersion",+ "Unknown Version {0}."}

    ,
    +

    • // GUI components
    • // Labels

    { "index.findLabel", "\u691c\u7d22 : "}

    ,

{ "search.findLabel", "\u691c\u7d22 : "}

,
@@ -86,7 +112,7 @@

{ "search.mid", "Medium"}

,

{ "search.midlow", "Medium low"}

,

{ "search.low", "Low"}

,

{ "favorites.add", "\u8ffd\u52a0"}

,

{ "favorites.remove", "\u524a\u9664"}

,

{ "favorites.folder", "\u65b0\u898f\u30df=u30a9\u30eb\u30c0\u30fc\u 306e\u4f5c\u6210"}

,
@@ -95,8 +121,11 @@

{ "favorites.paste", "\u8cbc\u308a\u4ed8\u3051"}

,

{ "favorites.copy" , "u30b3\u30d4\u30fc"}

,

{ "history.homePage", "Home page"}

,
+

{ "history.unknownTitle", ""}

,
+
// ToolTips for Action

  • { "tooltip.BactionAction", "\u524d\u306e\u30da\u30fc\u30b8"}

    ,
    +

    { "tooltip.BackAction", "\u524d\u306e\u30da\u30fc\u30b8"}

    ,

    { "tooltip.ForwardAction", "\u6b21\u306e\u30da\u30fc\u30b8"}

    ,

    { "tooltip.PrintAction", "\u5370\u5237"}

    ,

    { "tooltip.PrintSetupAction", "\u30da\u30fc\u30b8\u8a2d\u5b9a"}

    ,

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Change License to GPL instead of Sun BCLA in svn

These files had Sun BCLA in them:
betelgeuse@pena /mnt/checkouts/javahelp-trunk $ less
./javahelp_nbproject/dist/javahelp2-2.0.02/jhMaster/JavaHelp/LICENSE.html
betelgeuse@pena /mnt/checkouts/javahelp-trunk $ less
./jhMaster/JavaHelp/LICENSE.html

You should mention GPL somewhere in the distributed files too. The www directory
does not get included to the source releases.

betelgeuse@pena /mnt/checkouts/javahelp-trunk $ grep -i gpl -r .
Binary file ./www/TCK/.svn/text-base/jhTCK2_0.zip.svn-base matches
Binary file ./www/TCK/jhTCK2_0.zip matches
./www/.svn/text-base/license.txt.svn-base:The GNU General Public License (GPL)
./www/license.txt:The GNU General Public License (GPL)
Binary file
./jhMaster/JavaHelp/demos/hs/idehelp/images/visual/.svn/text-base/extend2.gif.svn-base
matches
Binary file
./jhMaster/JavaHelp/demos/hs/idehelp/images/visual/.svn/text-base/textend2.gif.svn-base
matches
Binary file ./jhMaster/JavaHelp/demos/hs/idehelp/images/visual/textend2.gif matches
Binary file ./jhMaster/JavaHelp/demos/hs/idehelp/images/visual/extend2.gif matches
Binary file ./javahelp_nbproject/dist/javahelp2-src-2.0.02.zip matches
Binary file
./javahelp_nbproject/dist/javahelp2-2.0.02/jhMaster/JavaHelp/demos/hs/idehelp/images/visual/textend2.gif
matches
Binary file
./javahelp_nbproject/dist/javahelp2-2.0.02/jhMaster/JavaHelp/demos/hs/idehelp/images/visual/extend2.gif
matches

Environment

Operating System: All
Platform: All

Affected Versions

[current]

NPE from javax.help.plaf.basic.BasicTOCNavigatorUI.presentData

Original bug report is at http://www.netbeans.org/issues/show_bug.cgi?id=87066.
I just tested with latest NetBeans IDE dev build and JavaHelp (even if NetBeans
uses JavaHelp 2.0_04 there is no difference in these sources between 2.0_04 and
current 2.0_05). NetBeans IDE is available at bits.netbeans.org.

Steps to reproduce:
1.Get NetBeans IDE.
2.Get Substance module nbm from https://substance-netbeans.dev.java.net/ and
install it using Tools -> Plugins. Open Plugins dialog and go to 3rd tab
Downloaded. Press button Add Plugins and select downloaded nbm in file chooser.
Install module.
3.Open help window Help -> Help Contents
4.Change skins using View -> Skins. During switching (try eg. Finding Nemo and
Green Magic) NPE is thrown. I will attach ide log. It also contains exception
call stack at the end.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Component creation off EDT.

When using the JavaHelp viewer in conjunction with Substance look and feel the
viewer throws a substance.UIThreadingViolationException indicating swing
components are being created off the event dispatch thread. Digging through the
source I see that in JHelpPrintHandler.java in the PrintThread inner class you
can see: JEditorPane editor = new JHEditorPane(); The JHEditorPane is an inner
class that extends JEditorPane and is therefore a swing component which is
clearly being created off the EDT. I have also noticed in other bug filings you
mention that swing is not thread safe and component creation should be on the
EDT in for example bug ID 6206465. Showing you are aware of this being a bug.
The creation of this component should probably be done on the EDT per your own
advice in the aforementioned bug filing.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Increadible memory leaks

If you show your help pages using

new CSH.DisplayHelpAfterTracking
(
helpBroker.getHelpSet(),
"javax.help.SecondaryWindow",
"Popup"
)

Whenever you close the help window the JHelp instance and all its components
subtree stays in memory - do it few times and you get OutOfMemory exception.

1. BasicFavoritesNavigatorUI hooks itself as HelpSetListener to HelpSet
and never releases the hook

2. JHelp is hookes to HelpSet as HelpSetListener and never releases the hook

3. The StyledDocument inside BasicContentViewerUI.JHEditorPane seems to be
hanging on Styles from the defaultStyles inside HTMLEditorKit.

4. JHelpPrintHandler and its handlers is one big memory leak, somebody here
does not understand how to use WeakHashMap - ONLY THE KEYS are hold via
weak references not the values and if the value has a strong reference to
the key then we have a memory leak

The same problem may happen with javax.help.MainWindow, the only savior there is
the fact that the MainWindow is singleton and it is not recreated on every help
display action.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

clone methods violate clone's contract

Most (all?) clone methods are not properly written. Consider the following
example:

public class MyHTMLIndexerKit extends HTMLIndexerKit {}

(new MyHTMLIndexKit().clone() instanceof MyHTMLIndexerKit) == false

If I override the clone method (correctly by calling super):

public class MyHTMLIndexerKit extends HTMLIndexerKit {
public void clone() throws CloneNotSupportedException {
//causes a ClassCastException
MyHTMLIndexKit clone = null;

try

{ clone = (MyHTMLIndexerKit) super.clone(); }

catch (CloneNotSupportedException neverThrown)

{ //does nothing }

return clone;
}
}

Since clone is not properly implemented by HTMLIndexerKit, I can never properly
implement in a subclass.

So far, of all of the clone methods that I have inspected, none of them are
correctly implemented. They simply are returning a new instance of the class.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Dutch translation for Constants.java

/*

  • Constants_nl.java
    *
  • Originally: Constants.java 1.8 - last change made 01/29/99
  • Translated to Dutch by Nico Van Cleemput, UGent on 12 sep 2006
    */

package javax.help.resources;

import java.util.ListResourceBundle;

/**

  • Constants used for localizing JavaHelp.
    *
  • These are in the form of key, value.
  • Translators take care to only translate the values.
    */

public class Constants_nl extends ListResourceBundle {
/**

  • Overrides ListResourceBundle.
    */
    public Object[][] getContents() {
    return new Object[][] {

// Constant strings and patterns
{ "helpset.wrongPublicID",
"Ongekend PublicID

{0}"},
{ "helpset.wrongTitle",
"Poging om titel te veranderen naar {0}

maar de titel is reeds

{1}."},
{ "helpset.wrongHomeID",
"Poging om homeID te veranderen naar {0} maar deze heeft reeds de waarde {1}

."},
{ "helpset.subHelpSetTrouble",
"Probleem tijdens het maken subhelpset:

{0}."},
{ "helpset.malformedURL",
"Slechtgevormde URL: {0}

."},
{ "helpset.incorrectURL",
"Incorrecte URL:

{0}."},
{ "helpset.wrongText",
"{0}

kan de tekst

{1} niet bevatten."},
{ "helpset.wrongTopLevel",
"{0} kan geen tag op het hoogste niveau zijn."},
{ "helpset.wrongParent",
"De oudertag voor {0} kan niet {1}

zijn."},
{ "helpset.unbalanced",
"Ongebalanceerde tag

{0}."},
{ "helpset.wrongLocale",
"Waarschuwing: xml:lang attribuut {0}

is in strijd met default

{1}

en met
default

{2}

"},
{ "helpset.unknownVersion",
"Ongekende Versie

{0}."},

// IndexView messages
{ "index.invalidIndexFormat", "Waarschuwing: Ongeldig Indexformaat"},
{ "index.unknownVersion",
"Ongekende Versie {0}

."},

// TOCView messages
{ "toc.wrongPublicID",
"Ongekend PublicID

{0}"},
{ "toc.invalidTOCFormat", "Waarschuwing: Ongeldig TOCformaat"},
{ "toc.unknownVersion",
"Ongekende Versie {0}

."},

// FavoritesView messages

{ "favorites.invalidFavoritesFormat", "Waarschuwing: Ongeldig Favorietenformaat"}

,
{ "favorites.unknownVersion",
"Ongekende Versie

{0}."},

// Map messages
{ "map.wrongPublicID",
"Ongekend PublicID {0}

"},

{ "map.invalidMapFormat", "Waarschuwing: Ongeldig Mapformaat"}

,
{ "map.unknownVersion",
"Ongekende Versie

{0}

."},

// GUI components
// Labels

{ "index.findLabel", "Zoek: "}

,

{ "search.findLabel", "Zoek: "}

,

{ "search.hitDesc", "Aantal keren van van voorkomen in document"}

,

{ "search.qualityDesc", "Laagste foutwaarde in document" }

,

{ "search.high", "Hoog"}

,

{ "search.midhigh", "Gemiddeld hoog"}

,

{ "search.mid", "Gemiddeld"}

,

{ "search.midlow", "Gemiddeld laag"}

,

{ "search.low", "Laag"}

,

{ "favorites.add", "Toevoegen"}

,

{ "favorites.remove", "Verwijderen"}

,

{ "favorites.folder", "Nieuwe map"}

,

{ "favorites.name", "Naam"}

,

{ "favorites.cut", "Knippen"}

,

{ "favorites.paste", "Plakken"}

,

{ "favorites.copy" , "Kopiëren"}

,

{ "history.homePage", "Startpagina"}

,

{ "history.unknownTitle", ""}

,

// ToolTips for Actions

{ "tooltip.BackAction", "Vorige Pagina"}

,

{ "tooltip.ForwardAction", "Volgende Pagina"}

,

{ "tooltip.PrintAction", "Afdrukken"}

,

{ "tooltip.PrintSetupAction", "Afdrukinstellingen"}

,

{ "tooltip.ReloadAction", "Herladen"}

,

{ "tooltip.FavoritesAction", "Toevoegen aan Favorieten"}

,

{ "tooltip.HomeAction", "Ga naar de startpagina"}

,

// Accessibility names

{ "access.BackAction", "Vorige Knop"}

,

{ "access.ForwardAction", "Volgende Knop"}

,

{ "access.HistoryAction", "Geschiedenis Knop"}

,

{ "access.PrintAction", "Afdrukken Knop"}

,

{ "access.PrintSetupAction", "Afdrukinstellingen Knop"}

,

{ "access.ReloadAction", "Herladen Knop"}

,

{ "access.HomeAction", "Startpagina Knop"}

,

{ "access.FavoritesAction", "Toevoegen aan Favorieten Knop"}

,

{ "access.contentViewer", "Inhoud weergave"}

};
}
}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

The JavaHelp View is updated only if the current help id changes, scrolled away topics are not shown if same id is used again.

The JavaHelp View is updated only if the current help id changes, to pressing the same help button twice does not update anything even if the current topic was scrolled away by help of scrollbar.
Workaround: select another topic in TOC Tree and the press the help button in the user application again.

Here is the java help code from sun DefaultHelpModel.java which may help to analyse the problem:

public void setCurrentID(ID ident, String historyName, JHelpNavigator navigator) throws InvalidHelpSetContextException{
if (ident == null)

{ ident = helpset.getHomeID(); }

if (ident == null || ident.equals(currentID))

{ // quick return if already set return; }

Environment

windows / javahelp 2.0_05

Links to external URLs in Java Help

I searched different sources on the internet to learn whether it is possible to open external URLs from Java Help. The information I found is quite contradictory.
Even though some sources claimed that it is possible to open external URLs in Java Help (perhaps in a new window) I was not able to make this work either using the object "tag" or the standard "a" tag.

I was wondering if it would be possible to add the following functionality to future releases of Java Help.

  • open links to external URLs in default browser
  • open mail to links

Thank you.

Pavel Skopik

Affected Versions

[current]

Data Missing

There is almost nothing available:

  • no files in the archive in release section;
  • almost no files in the git repository.

Webstart hosting for JavaHelp core APIs

At the link above, I have examples of JavaHelp launched using Java webstart
(JWS), complete with the downloadable* build/source etc..

JWS based deployment makes JavaHelp easiser for developers to hook into. Not
only for their JWS based apps, but using HelpSetter (based on the HelpButton
applet), any app. that can open a link (e.g. applets and 1.6+ desktop apps.).

Please accept these files as part of the JavaHelp project, with a view to
offering them off the JavaHelp site. The files are offered under whatever
license best suits your needs.

Environment

Operating System: All
Platform: All
URL: http://pscode.org/jh/

Affected Versions

[current]

Java Help 2_0_05 Memory Leak in FlatMap

We have a Java Desktop Application which uses JavaHelp library to show Help Content.

From "Main Java Window", we launch another "JFrame Window". The later "JFrame Window" can be closed and opened several times when "Main Java Window" is still alive.

"JFrame Window" used JavaHelp and creates HelpSet etc. When we close the "JFrame Window" we call cleanup method on HelpSet and HelpBroker object and assign the object=null.

Note that we have large number of help html files. But it is observed that JavaHelp's FlatMap object is not getting released for after closing "JFrame Window" (Even after running GC). "FlatMap" has "FlatMapResourceBundle" inner class which has got "lookup" hashtable. This "lookup" hashtable is storing big chunk of memory.

I've written the sample example to re-create the issue.

Request you to follow below instructions.

  1. Download attached sample zip file. Extract it. This has doc, lib, src directory.
  2. Download http://download.java.net/javadesktop/javahelp/javahelp2_0_05.zip and put "jhall.jar" in lib directory.
  3. You need large number of html files. We use Java Help Documentation
    Goto http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html#docs
    Navigate to the "J2SE 5.0 Documentation" on the same page and click "download" to download "jdk-1_5_0-doc.zip" (Follow the page to download as instructed).
  4. Just extract above download documentation into "doc" directory.
  5. The sample program is very very generic as it generates helpset, map files too.
  • 1. Creates Map file from given directory containing set of HTML files (JDK Documentation)
  • 2. Creates HelpSet
  • 3. Put the thread to Sleep for about 5 seconds
  • 4. Cleanup HelpSet
  • 5. Force Java Garbage Collection
  • 6. Repeat 2 to 5 about 10 times
  • 7. Wait for user input so that you can check for memory leak

CD to "src" directory and compile and run the sample as shown below.

Compile
javac -classpath ..\lib\jhall.jar com\org\test\memory\TestJavaHelpMem.java

Run
java -classpath .;..\lib\jhall.jar com.org.test.memory.TestJavaHelpMem "..\doc"

Now what we need

We need a API (a cleanup function) to remove the memory chunk held by FlatMap::FlatMapResourceBundle::lookup table.
Also have a look at cleanup the memory reference around it.

Environment

Windows 2003 Professional, Java Help 2_0_05, Java version "1.6.0_25"

Affected Versions

[current]

Popup windows are not dismissed when the help viewer is closed.

When the help viewer is closed (using the X button on the window) the popup
windows are hidden along with the main help viewer.

However if the application re-shows the help viewer (with the F1 key) - the
popups are re-shown and they can not be dismissed.

Showing a new popup results then in a new popup being created and shown.

Environment

Operating System: Windows XP
Platform: Other

Affected Versions

[current]

Not all files contain GPL license header

Following folders contain files with non GPL license headers:
jhMaster/JavaHelp/demos
jhMaster/JavaHelp/solarispkgs
jhMaster/JavaHelp/linuxRPM
jhMaster/JSearch/demos

Is content of file jhMaster/JavaHelp/LICENSE.html valid? There are also README
files in folder jhMaster/JavaHelp with license text in the end.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.