Bug 41357 NPE: Opening Browser after Javadoc export [javadoc]
OSX version 10.2.6 Eclipse: 200308060800 !ENTRY org.eclipse.debug.core 4 2 Aug 09, 2003 12:11:03.917 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.debug.core". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.actions.OpenBrowserUtil.open(OpenBrowserUtil.java:30) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard.spawnInBrowser(JavadocWizard.java:460) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard.access$3(JavadocWizard.java:455) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard$JavadocDebugEventListener.handleDebugEvents( JavadocWizard.java:474) at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:858) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1015) at org.eclipse.core.runtime.Platform.run(Platform.java:420) at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:890) at org.eclipse.debug.core.DebugPlugin.fireDebugEventSet(DebugPlugin.java:306) at org.eclipse.debug.internal.core.RuntimeProcess.fireEvent(RuntimeProcess.java:238) at org.eclipse.debug.internal.core.RuntimeProcess.fireTerminateEvent(RuntimeProcess.java:246) at org.eclipse.debug.internal.core.RuntimeProcess.terminated(RuntimeProcess.java:215) at org.eclipse.debug.internal.core.ProcessMonitorJob.run(ProcessMonitorJob.java:51) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) !ENTRY org.eclipse.debug.core 4 120 Aug 09, 2003 12:11:03.923 !MESSAGE An exception occurred while dispatching debug events. !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.actions.OpenBrowserUtil.open(OpenBrowserUtil.java:30) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard.spawnInBrowser(JavadocWizard.java:460) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard.access$3(JavadocWizard.java:455) at org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard$JavadocDebugEventListener.handleDebugEvents( JavadocWizard.java:474) at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:858) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1015) at org.eclipse.core.runtime.Platform.run(Platform.java:420) at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:890) at org.eclipse.debug.core.DebugPlugin.fireDebugEventSet(DebugPlugin.java:306) at org.eclipse.debug.internal.core.RuntimeProcess.fireEvent(RuntimeProcess.java:238) at org.eclipse.debug.internal.core.RuntimeProcess.fireTerminateEvent(RuntimeProcess.java:246) at org.eclipse.debug.internal.core.RuntimeProcess.terminated(RuntimeProcess.java:215) at org.eclipse.debug.internal.core.ProcessMonitorJob.run(ProcessMonitorJob.java:51) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBrowserUtil.java
public static void open(final URL url, final Shell shell, final String dialogTitle) {
		IHelp help= WorkbenchHelp.getHelpSupport();
		if (help != null) {
			BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
				public void run() {
					WorkbenchHelp.getHelpSupport().displayHelpResource(url.toExternalForm());
				}
			});			
		} else {
			showMessage(shell, dialogTitle, ActionMessages.getString("OpenBrowserUtil.help_not_available"), false); 
		}
	}
	
	private static void showMessage(final Shell shell, final String title, final String message, final boolean isError) {
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
				if (isError) {
					MessageDialog.openError(shell, title, message);
				} else {
					MessageDialog.openInformation(shell, title, message);
				}
			}
		});
	}	
}