|
34 | 34 | import java.util.function.Function; |
35 | 35 | import java.util.function.Predicate; |
36 | 36 | import java.util.stream.Stream; |
37 | | -import org.eclipse.core.commands.ParameterizedCommand; |
38 | 37 | import org.eclipse.core.runtime.preferences.IEclipsePreferences; |
39 | | -import org.eclipse.e4.core.commands.ECommandService; |
40 | | -import org.eclipse.e4.core.commands.EHandlerService; |
41 | 38 | import org.eclipse.e4.core.contexts.IEclipseContext; |
42 | 39 | import org.eclipse.e4.core.di.annotations.Optional; |
43 | 40 | import org.eclipse.e4.core.di.extensions.Preference; |
@@ -1538,15 +1535,9 @@ protected void populateTabMenu(final Menu menu, MPart part) { |
1538 | 1535 | new MenuItem(menu, SWT.SEPARATOR); |
1539 | 1536 |
|
1540 | 1537 | createMenuItem(menu, SWTRenderersMessages.menuCloseAll, e -> closeSiblingParts(menu, false)); |
1541 | | - |
1542 | | - new MenuItem(menu, SWT.SEPARATOR); |
1543 | | - |
1544 | 1538 | } |
1545 | 1539 | } |
1546 | 1540 |
|
1547 | | - createMenuItem(menu, SWTRenderersMessages.splitEditorH, e -> splitEditor(part.getContext(), true)); |
1548 | | - createMenuItem(menu, SWTRenderersMessages.splitEditorV, e -> splitEditor(part.getContext(), false)); |
1549 | | - |
1550 | 1541 | if (isDetachable(part)) { |
1551 | 1542 | if (closeableElements > 0) { |
1552 | 1543 | new MenuItem(menu, SWT.SEPARATOR); |
@@ -1962,12 +1953,4 @@ private <T extends Control> T getChild(Composite parent, String id, Class<T> typ |
1962 | 1953 | return Arrays.stream(parent.getChildren()).filter(child -> id.equals(child.getData(ID))) |
1963 | 1954 | .filter(type::isInstance).map(type::cast).findFirst().orElse(null); |
1964 | 1955 | } |
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 | | - } |
1973 | 1956 | } |
0 commit comments