Skip to content

Commit 3e20601

Browse files
SougandhSmerks
authored andcommitted
Revert "Add Split Editor shortcuts to editor tab context menu"
This reverts commit a7dc486.
1 parent 085f934 commit 3e20601

File tree

3 files changed

+3
-26
lines changed

3 files changed

+3
-26
lines changed

bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/internal/workbench/renderers/swt/SWTRenderersMessages.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2010, 2025 IBM Corporation and others.
2+
* Copyright (c) 2010, 2015 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,10 +38,6 @@ public class SWTRenderersMessages extends NLS {
3838

3939
public static String viewMenu;
4040

41-
public static String splitEditorH;
42-
43-
public static String splitEditorV;
44-
4541
static {
4642
// load message values from bundle file
4743
reloadMessages();

bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/internal/workbench/renderers/swt/messages.properties

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright (c) 2010, 2025 IBM Corporation and others.
2+
# Copyright (c) 2010, 2015 IBM Corporation and others.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the Eclipse Public License 2.0
@@ -26,6 +26,4 @@ menuCloseAll = Close &All
2626
menuCloseRight = Close Tabs to the &Right
2727
menuCloseLeft = Close Tabs to the &Left
2828
menuDetach= &Detach
29-
viewMenu = View Menu
30-
splitEditorH = Split Editor in Horizontal
31-
splitEditorV = Split Editor in Vertical
29+
viewMenu = View Menu

bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
import java.util.function.Function;
3535
import java.util.function.Predicate;
3636
import java.util.stream.Stream;
37-
import org.eclipse.core.commands.ParameterizedCommand;
3837
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
39-
import org.eclipse.e4.core.commands.ECommandService;
40-
import org.eclipse.e4.core.commands.EHandlerService;
4138
import org.eclipse.e4.core.contexts.IEclipseContext;
4239
import org.eclipse.e4.core.di.annotations.Optional;
4340
import org.eclipse.e4.core.di.extensions.Preference;
@@ -1538,15 +1535,9 @@ protected void populateTabMenu(final Menu menu, MPart part) {
15381535
new MenuItem(menu, SWT.SEPARATOR);
15391536

15401537
createMenuItem(menu, SWTRenderersMessages.menuCloseAll, e -> closeSiblingParts(menu, false));
1541-
1542-
new MenuItem(menu, SWT.SEPARATOR);
1543-
15441538
}
15451539
}
15461540

1547-
createMenuItem(menu, SWTRenderersMessages.splitEditorH, e -> splitEditor(part.getContext(), true));
1548-
createMenuItem(menu, SWTRenderersMessages.splitEditorV, e -> splitEditor(part.getContext(), false));
1549-
15501541
if (isDetachable(part)) {
15511542
if (closeableElements > 0) {
15521543
new MenuItem(menu, SWT.SEPARATOR);
@@ -1962,12 +1953,4 @@ private <T extends Control> T getChild(Composite parent, String id, Class<T> typ
19621953
return Arrays.stream(parent.getChildren()).filter(child -> id.equals(child.getData(ID)))
19631954
.filter(type::isInstance).map(type::cast).findFirst().orElse(null);
19641955
}
1965-
1966-
private void splitEditor(IEclipseContext ctx, boolean isHorizontal) {
1967-
ECommandService commandService = ctx.get(ECommandService.class);
1968-
EHandlerService handlerService = ctx.get(EHandlerService.class);
1969-
Map<String, String> param = Map.of("Splitter.isHorizontal", String.valueOf(isHorizontal)); //$NON-NLS-1$
1970-
ParameterizedCommand command = commandService.createCommand("org.eclipse.ui.window.splitEditor", param); //$NON-NLS-1$
1971-
handlerService.executeHandler(command);
1972-
}
19731956
}

0 commit comments

Comments
 (0)