geertjanw closed pull request #249: Not copying the JavaHelp library into the binary. URL: https://github.com/apache/incubator-netbeans/pull/249
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/javahelp/external/jhall-2.0_05-license.txt b/javahelp/external/jhall-2.0_05-license.txt index c5226b6a9..7ec522e02 100644 --- a/javahelp/external/jhall-2.0_05-license.txt +++ b/javahelp/external/jhall-2.0_05-license.txt @@ -5,6 +5,7 @@ Source: https://javahelp.dev.java.net/files/documents/5985/59373/javahelp2-src-2 Description: Standard Java help browser system. Origin: Oracle URL: http://download.java.net/javadesktop/javahelp/javahelp2_0_05.zip +Type: compile-time The GNU General Public License (GPL) Version 2, June 1991 diff --git a/javahelp/manifest.mf b/javahelp/manifest.mf index b3cfb70cc..072358d18 100644 --- a/javahelp/manifest.mf +++ b/javahelp/manifest.mf @@ -6,5 +6,4 @@ OpenIDE-Module-Provides: org.netbeans.api.javahelp.Help OpenIDE-Module-Requires: org.openide.modules.InstalledFileLocator, org.openide.modules.ModuleFormat2 OpenIDE-Module-Layer: org/netbeans/modules/javahelp/resources/layer.xml OpenIDE-Module-Install: org/netbeans/modules/javahelp/Installer.class -OpenIDE-Module-Hide-Classpath-Packages: javax.help.**, com.sun.java.help.** diff --git a/javahelp/nbproject/project.properties b/javahelp/nbproject/project.properties index acb1287cb..fd29d3449 100644 --- a/javahelp/nbproject/project.properties +++ b/javahelp/nbproject/project.properties @@ -16,7 +16,6 @@ # under the License. is.autoload=true -release.external/jhall-2.0_05.jar=modules/ext/jhall-2.0_05.jar javac.compilerargs=-Xlint:unchecked javac.source=1.6 diff --git a/javahelp/nbproject/project.xml b/javahelp/nbproject/project.xml index a9e14acda..5724e66d5 100644 --- a/javahelp/nbproject/project.xml +++ b/javahelp/nbproject/project.xml @@ -178,10 +178,9 @@ </test-dependencies> <public-packages> <package>org.netbeans.api.javahelp</package> - <subpackages>javax.help</subpackages> </public-packages> <class-path-extension> - <runtime-relative-path>ext/jhall-2.0_05.jar</runtime-relative-path> + <runtime-relative-path/> <binary-origin>external/jhall-2.0_05.jar</binary-origin> </class-path-extension> </data> diff --git a/javahelp/src/org/netbeans/modules/javahelp/HelpCtxProcessor.java b/javahelp/src/org/netbeans/modules/javahelp/HelpCtxProcessor.java index 3f3f5e423..d567db6e7 100644 --- a/javahelp/src/org/netbeans/modules/javahelp/HelpCtxProcessor.java +++ b/javahelp/src/org/netbeans/modules/javahelp/HelpCtxProcessor.java @@ -64,6 +64,12 @@ private static Help findHelp() { } public @Override Lookup getEnvironment(final DataObject obj) { + try { + Class.forName("javax.help.HelpSet"); + } catch (ClassNotFoundException ex) { + //JavaHelp not available, ignore: + return Lookup.EMPTY; + } Installer.log.log(Level.FINE, "creating help context presenter from {0}", obj.getPrimaryFile()); return Lookups.singleton(new InstanceCookie() { private Action instance = null; diff --git a/javahelp/src/org/netbeans/modules/javahelp/HelpSetProcessor.java b/javahelp/src/org/netbeans/modules/javahelp/HelpSetProcessor.java index 3f6679c19..48eace5e2 100644 --- a/javahelp/src/org/netbeans/modules/javahelp/HelpSetProcessor.java +++ b/javahelp/src/org/netbeans/modules/javahelp/HelpSetProcessor.java @@ -54,6 +54,12 @@ private static final String HELPSET_MERGE_ATTR = "mergeIntoMaster"; // NOI18N public @Override Lookup getEnvironment(final DataObject obj) { + try { + Class.forName("javax.help.HelpSet"); + } catch (ClassNotFoundException ex) { + //JavaHelp not available, ignore: + return Lookup.EMPTY; + } Installer.log.log(Level.FINE, "creating help set from ref: {0}", obj.getPrimaryFile()); return Lookups.singleton(new InstanceCookie() { public @Override String instanceName() { ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
