Skip to content

Commit ed0fd62

Browse files
author
Akos Kitta
committed
fix: blacklist undesired New Text File menu
Ref: eclipse-theia/theia#12819 Signed-off-by: Akos Kitta <[email protected]>
1 parent 9e668d5 commit ed0fd62

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { injectable } from '@theia/core/shared/inversify';
2-
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
31
import {
4-
CommonFrontendContribution as TheiaCommonFrontendContribution,
52
CommonCommands,
3+
CommonFrontendContribution as TheiaCommonFrontendContribution,
64
} from '@theia/core/lib/browser/common-frontend-contribution';
7-
import { CommandRegistry } from '@theia/core/lib/common/command';
85
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application';
9-
import { KeybindingRegistry } from '@theia/core/lib/browser';
10-
import { isOSX } from '@theia/core';
6+
import type { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
7+
import type { CommandRegistry } from '@theia/core/lib/common/command';
8+
import type { MenuModelRegistry } from '@theia/core/lib/common/menu';
9+
import { isOSX } from '@theia/core/lib/common/os';
10+
import { injectable } from '@theia/core/shared/inversify';
1111

1212
@injectable()
1313
export class CommonFrontendContribution extends TheiaCommonFrontendContribution {
@@ -25,6 +25,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
2525
CommonCommands.PIN_TAB,
2626
CommonCommands.UNPIN_TAB,
2727
CommonCommands.NEW_UNTITLED_FILE,
28+
CommonCommands.NEW_UNTITLED_TEXT_FILE,
2829
]) {
2930
commandRegistry.unregisterCommand(command);
3031
}
@@ -48,6 +49,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
4849
CommonCommands.ABOUT_COMMAND,
4950
CommonCommands.SAVE_WITHOUT_FORMATTING, // Patched for https://github.com/eclipse-theia/theia/pull/8877,
5051
CommonCommands.NEW_UNTITLED_FILE,
52+
CommonCommands.NEW_UNTITLED_TEXT_FILE,
5153
]) {
5254
registry.unregisterMenuAction(command);
5355
}

0 commit comments

Comments
 (0)