chore(deps): update to theia@1.41.0 (#2211)

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2023-09-29 18:40:13 +02:00
committed by GitHub
parent ce02e263ec
commit 8f4bcc83ec
12 changed files with 1431 additions and 1331 deletions

View File

@@ -1,13 +1,13 @@
import { injectable } from '@theia/core/shared/inversify';
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
import {
CommonFrontendContribution as TheiaCommonFrontendContribution,
CommonCommands,
CommonFrontendContribution as TheiaCommonFrontendContribution,
} from '@theia/core/lib/browser/common-frontend-contribution';
import { CommandRegistry } from '@theia/core/lib/common/command';
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application';
import { KeybindingRegistry } from '@theia/core/lib/browser';
import { isOSX } from '@theia/core';
import type { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
import type { CommandRegistry } from '@theia/core/lib/common/command';
import type { MenuModelRegistry } from '@theia/core/lib/common/menu';
import { isOSX } from '@theia/core/lib/common/os';
import { injectable } from '@theia/core/shared/inversify';
@injectable()
export class CommonFrontendContribution extends TheiaCommonFrontendContribution {
@@ -25,6 +25,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
CommonCommands.PIN_TAB,
CommonCommands.UNPIN_TAB,
CommonCommands.NEW_UNTITLED_FILE,
CommonCommands.NEW_UNTITLED_TEXT_FILE,
]) {
commandRegistry.unregisterCommand(command);
}
@@ -48,6 +49,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
CommonCommands.ABOUT_COMMAND,
CommonCommands.SAVE_WITHOUT_FORMATTING, // Patched for https://github.com/eclipse-theia/theia/pull/8877,
CommonCommands.NEW_UNTITLED_FILE,
CommonCommands.NEW_UNTITLED_TEXT_FILE,
]) {
registry.unregisterMenuAction(command);
}

View File

@@ -19,7 +19,9 @@ export class MonacoTextModelService extends TheiaMonacoTextModelService {
const factory = this.factories
.getContributions()
.find(({ scheme }) => resource.uri.scheme === scheme);
const readOnly = this.sketchesServiceClient.isReadOnly(resource.uri);
const readOnly =
Boolean(resource.isReadonly) ||
this.sketchesServiceClient.isReadOnly(resource.uri);
return factory
? factory.createModel(resource)
: new MaybeReadonlyMonacoEditorModel(