diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java index 2da4683730e..68508e010ae 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java @@ -334,13 +334,13 @@ public void createPartControl(Composite parent) { // done if (getActivePage() == -1) { setActivePage(0); - IEditorPart part = getEditor(0); - if (part != null) { - final IServiceLocator serviceLocator = part.getEditorSite(); - if (serviceLocator instanceof INestable) { - activeServiceLocator = (INestable) serviceLocator; - activeServiceLocator.activate(); - } + } + IEditorPart part = getEditor(getActivePage()); + if (part != null) { + final IServiceLocator serviceLocator = part.getEditorSite(); + if (serviceLocator instanceof INestable) { + activeServiceLocator = (INestable) serviceLocator; + activeServiceLocator.activate(); } } initializePageSwitching();