Project: Eclipse_Platform_UI
Bug 52290 [Fonts] NPE updating fonrts in the preference page
Reported: 2004-02-17 15:08:35 | Status: closed fixed

M7 If you update the fonts in the Fonts preference page you get the following NPE STEPS 1) Set the dialog font 2) Hit OK 3) Reopen the fonts preference page 4) Reset defaults 5) NPE java.lang.NullPointerException at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.updateTreeFont (FilteredPreferenceDialog.java:157) at org.eclipse.jface.preference.PreferenceDialog$7.propertyChange (PreferenceDialog.java:498) at org.eclipse.jface.resource.FontRegistry.fireFontMappingChanged (FontRegistry.java:319) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:497) at org.eclipse.jface.resource.FontRegistry.put(FontRegistry.java:464) at org.eclipse.ui.internal.fonts.FontDefinition$FontPreferenceListener.propertyCha nge(FontDefinition.java:75) at org.eclipse.ui.plugin.AbstractUIPlugin$2.run (AbstractUIPlugin.java:263) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:819) at org.eclipse.core.runtime.Platform.run(Platform.java:493) at org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore.firePropert yChangeEvent(AbstractUIPlugin.java:260) at org.eclipse.ui.plugin.AbstractUIPlugin$1.propertyChange (AbstractUIPlugin.java:202) at org.eclipse.core.runtime.Preferences.firePropertyChangeEvent (Preferences.java:588) at org.eclipse.core.runtime.Preferences.setToDefault (Preferences.java:1268) at org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore.setToDefaul t(AbstractUIPlugin.java:435) at org.eclipse.ui.internal.dialogs.FontPreferencePage.performOk (FontPreferencePage.java:587) at org.eclipse.jface.preference.PreferenceDialog.okPressed (PreferenceDialog.java:779) at org.eclipse.jface.preference.PreferenceDialog.buttonPressed (PreferenceDialog.java:223) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.buttonPressed (WorkbenchPreferenceDialog.java:75) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:402) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2352) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2033) at org.eclipse.jface.window.Window.runEventLoop(Window.java:647) at org.eclipse.jface.window.Window.open(Window.java:627) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:72) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:423) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2352) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2033) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1543) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1519) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:258) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:257) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:104) 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:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java