mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-24 11:46:32 +00:00
Removed File
> Close Editor
.
Closes arduino/arduino-ide#660 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
07962e81d4
commit
10ac7fd50a
@ -321,6 +321,8 @@ import { MonacoThemeServiceIsReady } from './utils/window';
|
||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||
import { StatusBarImpl } from './theia/core/status-bar';
|
||||
import { StatusBarImpl as TheiaStatusBarImpl } from '@theia/core/lib/browser';
|
||||
import { EditorMenuContribution } from './theia/editor/editor-file';
|
||||
import { EditorMenuContribution as TheiaEditorMenuContribution } from '@theia/editor/lib/browser/editor-menu';
|
||||
|
||||
const registerArduinoThemes = () => {
|
||||
const themes: MonacoThemeJson[] = [
|
||||
@ -640,6 +642,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
bind(WindowContribution).toSelf().inSingletonScope();
|
||||
rebind(TheiaWindowContribution).toService(WindowContribution);
|
||||
|
||||
// To remove `File` > `Close Editor`.
|
||||
bind(EditorMenuContribution).toSelf().inSingletonScope();
|
||||
rebind(TheiaEditorMenuContribution).toService(EditorMenuContribution);
|
||||
|
||||
bind(ArduinoDaemon)
|
||||
.toDynamicValue((context) =>
|
||||
WebSocketConnectionProvider.createProxy(
|
||||
|
@ -0,0 +1,12 @@
|
||||
import { MenuModelRegistry } from '@theia/core';
|
||||
import { CommonCommands } from '@theia/core/lib/browser';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { EditorMenuContribution as TheiaEditorMenuContribution } from '@theia/editor/lib/browser/editor-menu';
|
||||
|
||||
@injectable()
|
||||
export class EditorMenuContribution extends TheiaEditorMenuContribution {
|
||||
override registerMenus(registry: MenuModelRegistry): void {
|
||||
super.registerMenus(registry);
|
||||
registry.unregisterMenuAction(CommonCommands.CLOSE_MAIN_TAB.id);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user