Community
Participate
Working Groups
Created attachment 182811 [details] Fix HEAD Many clients of IDialogSettings#getSection(String) are not interested in whether the section already exists or not. They just want that section. Since there's no API for this on IDialogSettings, client code is full of boilerplate code like this: IDialogSettings section = MyPlugin.getDefault().getDialogSettings(). getSection(sectionName); if (section == null) { section = MyPlugin.getDefault().getDialogSettings(). addNewSection(sectionName); } Since we can't change IDialogSettings any more, the best solution I see is to add this as a static method DialogSettings#getOrCreateSection(IDialogSettings, String)
Bug 92518 might be of interest as well...
Discussed at today's Platform UI meeting. Markus, please go ahead.
Fixed in HEAD.
Verified in I20101206-1800. Filed bug 332012 to make sure the new API gets used.