diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java index 146d01c9069..a27a4514055 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java @@ -360,6 +360,7 @@ public void loadState(@NotNull JsonObject state) { } } + // restore perspective's active part if (state.hasKey("ACTIVE_PART")) { String activePart = state.getString("ACTIVE_PART"); Provider provider = dynaProvider.getProvider(activePart); @@ -387,6 +388,15 @@ private void restorePartController(PartStack partStack, WorkBenchPartController } } + // restore part stack's active part + if (partStackJSON.hasKey("ACTIVE_PART")) { + String activePart = partStackJSON.getString("ACTIVE_PART"); + Provider provider = dynaProvider.getProvider(activePart); + if (provider != null) { + partStack.setActivePart(provider.get()); + } + } + //hide part stack if it has no parts if (partStack.getParts().isEmpty()) { controller.setHidden(true);