Project: Eclipse_Platform_UI
Bug 257790 [MPE] [regression] MultiPageEditorPart.pageChange(int) fires PageChangedEvent if selected page is null.
Reported: 2008-12-05 19:41:03 | Status: closed fixed

MultiPageEditorPart.pageChange(int) fires PageChangedEvent if selected page is null. The org.eclipse.ui.part.MultiPageEditorPart.pageChange(int) method has changed between Eclipse 3.4.2 and Eclipse 3.5 M3 so it throws a PageChangedEvent when the selected page is null (last line of the method): firePageChanged(new PageChangedEvent(this, getSelectedPage())); In our multipage editor, we have three pages, each consisting of ScrolledComposites, so org.eclipse.ui.forms.editor.FormEditor.getActivePageInstance() (involked by org.eclipse.ui.forms.editor.FormEditor.getSelectedPage()) will always return null. As such, we get a NPE (see defect #257738) when we open our editor.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java