| Summary: | [Preferences] NPE opening preference dialog when only one preference page | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Brock Janiczak <brockj> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED DUPLICATE | QA Contact: | Oleg Besedin <ob1.eclipse> |
| Severity: | minor | ||
| Priority: | P3 | CC: | sptaszkiewicz |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 298451 *** |
Build Identifier: I20100312-1448 Attempting to open a preference dialog with a dsiplayed id filter fails when there is only one preference page in the application Reproducible: Always Steps to Reproduce: I have tried creating a preference dialog using both of these patterns: PreferencesUtil.createPreferenceDialogOn(getSite().getShell(), "PreferencePage", new String[] {"PreferencePage"}); and PreferencesUtil.createPreferenceDialogOn(getSite().getShell(), "PreferencePage", new String[] {}); It only works if i pass in null to the displayedIds field (which i don't want) I think there needs to be a "if (hasAtMostOnePage()) {" guard in showOnly see the below stacktrace for details: java.lang.NullPointerException at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showOnly(FilteredPreferenceDialog.java:356) at org.eclipse.ui.dialogs.PreferencesUtil.applyOptions(PreferencesUtil.java:75) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:194) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:116)