Bug 35246 NPE selecting Javadoc location for a JAR
Win32 - 2.1 I0317 I have a project that contains a single JAR. If I select the Javadoc location option under Properties of the JAR, the following exception occurs: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations.getJavadocBaseLocation (JavaDocLocations.java:164) at org.eclipse.jdt.ui.JavaUI.getJavadocBaseLocation(JavaUI.java:710) at org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationPropertyPage.create Contents(JavadocConfigurationPropertyPage.java:74) at org.eclipse.jface.preference.PreferencePage.createControl (PreferencePage.java:215) at org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationPropertyPage.create Control(JavadocConfigurationPropertyPage.java:63) at org.eclipse.jface.preference.PreferenceDialog.showPage (PreferenceDialog.java:1017) at org.eclipse.jface.preference.PreferenceDialog$9.run (PreferenceDialog.java:496) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.jface.preference.PreferenceDialog$8.widgetSelected (PreferenceDialog.java:490) at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent (OpenStrategy.java:198) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:193) at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:333) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:98) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1758) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1493) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at org.eclipse.ui.dialogs.PropertyDialogAction.run (PropertyDialogAction.java:164) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1781) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1489) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
* Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.preferences;
import java.net.URL;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.ui.dialogs.PropertyPage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
/**
 * Property page used to set the project's Javadoc location for sources
 */
public class JavadocConfigurationPropertyPage extends PropertyPage implements IStatusChangeListener {