From 29831f849ca9b3f014e65f0b8097347272f19561 Mon Sep 17 00:00:00 2001 From: Deepika Udayagiri Date: Thu, 4 Apr 2024 13:44:16 +0530 Subject: [PATCH] MultiVariablePageTest fails on all platforms Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/1736 --- .../org/eclipse/ui/part/MultiPageEditorPart.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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();