diff options
author | Patrik Suzzi | 2018-06-17 22:12:09 +0000 |
---|---|---|
committer | Patrik Suzzi | 2018-06-22 15:28:39 +0000 |
commit | 60937a1d4c7555dadd46ee3c674f1b9995417c64 (patch) | |
tree | 975e7d07206371bfc52c32cbaaecb34d49e19d4b /bundles/org.eclipse.ui.workbench | |
parent | af9dd8e2f0d1c25a6de973de8b43d80dbfe95daf (diff) | |
download | eclipse.platform.ui-60937a1d4c7555dadd46ee3c674f1b9995417c64.tar.gz eclipse.platform.ui-60937a1d4c7555dadd46ee3c674f1b9995417c64.tar.xz eclipse.platform.ui-60937a1d4c7555dadd46ee3c674f1b9995417c64.zip |
Bug 535753 - Navigation problems and NPE with split editor
Fix the bug by preventing the Cycle View Editor to select a View which
is instance of SplitHost.
Change-Id: Ib82a169e4c01e5f7100208b9bbb3a0bdcb03a44b
Signed-off-by: Patrik Suzzi <psuzzi@itemis.com>
Diffstat (limited to 'bundles/org.eclipse.ui.workbench')
-rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleViewHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleViewHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleViewHandler.java index 9b19ecd1a00..dab6592a01f 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleViewHandler.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleViewHandler.java @@ -18,11 +18,13 @@ package org.eclipse.ui.internal; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.stream.Collectors; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.e4.ui.internal.workbench.PartServiceImpl; import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective; import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.eclipse.e4.ui.workbench.addons.splitteraddon.SplitHost; import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.ui.IWorkbenchCommandConstants; @@ -50,7 +52,8 @@ public class CycleViewHandler extends FilteredTableBaseHandler { MPerspective currentPerspective = page.getCurrentPerspective(); List<MPart> parts = modelService.findElements(currentPerspective, null, MPart.class, null, - EModelService.PRESENTATION); + EModelService.PRESENTATION).stream().filter((p) -> !(p.getObject() instanceof SplitHost)) + .collect(Collectors.toList()); AtomicBoolean includeEditor = new AtomicBoolean(true); |