mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 18:38:33 +00:00
Speed up IDE startup time.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -26,7 +26,7 @@ export class MonacoEditorProvider extends TheiaMonacoEditorProvider {
|
||||
@inject(SketchesServiceClientImpl)
|
||||
protected readonly sketchesServiceClient: SketchesServiceClientImpl;
|
||||
|
||||
protected async doCreateEditor(
|
||||
protected override async doCreateEditor(
|
||||
uri: URI,
|
||||
factory: EditorFactory
|
||||
): Promise<MonacoEditor> {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { MonacoStatusBarContribution as TheiaMonacoStatusBarContribution } from
|
||||
|
||||
@injectable()
|
||||
export class MonacoStatusBarContribution extends TheiaMonacoStatusBarContribution {
|
||||
protected setConfigTabSizeWidget() {}
|
||||
protected override setConfigTabSizeWidget() {}
|
||||
|
||||
protected setLineEndingWidget() {}
|
||||
protected override setLineEndingWidget() {}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export class MonacoTextModelService extends TheiaMonacoTextModelService {
|
||||
@inject(SketchesServiceClientImpl)
|
||||
protected readonly sketchesServiceClient: SketchesServiceClientImpl;
|
||||
|
||||
protected async createModel(resource: Resource): Promise<MonacoEditorModel> {
|
||||
protected override async createModel(resource: Resource): Promise<MonacoEditorModel> {
|
||||
const factory = this.factories
|
||||
.getContributions()
|
||||
.find(({ scheme }) => resource.uri.scheme === scheme);
|
||||
@@ -33,7 +33,7 @@ export class MonacoTextModelService extends TheiaMonacoTextModelService {
|
||||
|
||||
// https://github.com/eclipse-theia/theia/pull/8491
|
||||
class SilentMonacoEditorModel extends MonacoEditorModel {
|
||||
protected trace(loggable: Loggable): void {
|
||||
protected override trace(loggable: Loggable): void {
|
||||
if (this.logger) {
|
||||
this.logger.trace((log: Log) =>
|
||||
loggable((message, ...params) =>
|
||||
@@ -46,24 +46,24 @@ class SilentMonacoEditorModel extends MonacoEditorModel {
|
||||
|
||||
class MaybeReadonlyMonacoEditorModel extends SilentMonacoEditorModel {
|
||||
constructor(
|
||||
protected readonly resource: Resource,
|
||||
protected readonly m2p: MonacoToProtocolConverter,
|
||||
protected readonly p2m: ProtocolToMonacoConverter,
|
||||
protected readonly logger?: ILogger,
|
||||
protected readonly editorPreferences?: EditorPreferences,
|
||||
protected override readonly resource: Resource,
|
||||
protected override readonly m2p: MonacoToProtocolConverter,
|
||||
protected override readonly p2m: ProtocolToMonacoConverter,
|
||||
protected override readonly logger?: ILogger,
|
||||
protected override readonly editorPreferences?: EditorPreferences,
|
||||
protected readonly _readOnly?: boolean
|
||||
) {
|
||||
super(resource, m2p, p2m, logger, editorPreferences);
|
||||
}
|
||||
|
||||
get readOnly(): boolean {
|
||||
override get readOnly(): boolean {
|
||||
if (typeof this._readOnly === 'boolean') {
|
||||
return this._readOnly;
|
||||
}
|
||||
return this.resource.saveContents === undefined;
|
||||
}
|
||||
|
||||
protected setDirty(dirty: boolean): void {
|
||||
protected override setDirty(dirty: boolean): void {
|
||||
if (this._readOnly === true) {
|
||||
// NOOP
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user