mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
EditorSimpleWorker -> EditorWebWorker
This commit is contained in:
+2
-2
@@ -19,10 +19,10 @@ function createModuleDescription(name, exclude) {
|
|||||||
* @param {string} name
|
* @param {string} name
|
||||||
*/
|
*/
|
||||||
function createEditorWorkerModuleDescription(name) {
|
function createEditorWorkerModuleDescription(name) {
|
||||||
return createModuleDescription(name, ['vs/base/common/worker/webWorker', 'vs/editor/common/services/editorSimpleWorker']);
|
return createModuleDescription(name, ['vs/base/common/worker/webWorker', 'vs/editor/common/services/editorWebWorker']);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.workerEditor = createEditorWorkerModuleDescription('vs/editor/common/services/editorSimpleWorkerMain');
|
exports.workerEditor = createEditorWorkerModuleDescription('vs/editor/common/services/editorWebWorkerMain');
|
||||||
exports.workerExtensionHost = createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorkerMain');
|
exports.workerExtensionHost = createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorkerMain');
|
||||||
exports.workerNotebook = createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookWebWorkerMain');
|
exports.workerNotebook = createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookWebWorkerMain');
|
||||||
exports.workerLanguageDetection = createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionWebWorkerMain');
|
exports.workerLanguageDetection = createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionWebWorkerMain');
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
|||||||
entryPoints: [
|
entryPoints: [
|
||||||
'vs/editor/editor.main',
|
'vs/editor/editor.main',
|
||||||
'vs/editor/editor.worker.start',
|
'vs/editor/editor.worker.start',
|
||||||
'vs/editor/common/services/editorSimpleWorkerMain',
|
'vs/editor/common/services/editorWebWorkerMain',
|
||||||
],
|
],
|
||||||
inlineEntryPoints: [
|
inlineEntryPoints: [
|
||||||
apiusages,
|
apiusages,
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ declare namespace monaco.languages {
|
|||||||
declare namespace monaco.worker {
|
declare namespace monaco.worker {
|
||||||
|
|
||||||
#include(vs/editor/common/model/mirrorTextModel): IMirrorTextModel
|
#include(vs/editor/common/model/mirrorTextModel): IMirrorTextModel
|
||||||
#includeAll(vs/editor/common/services/editorSimpleWorker;):
|
#includeAll(vs/editor/common/services/editorWebWorker;):
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { IRange, Range } from '../../common/core/range.js';
|
|||||||
import { ITextModel } from '../../common/model.js';
|
import { ITextModel } from '../../common/model.js';
|
||||||
import * as languages from '../../common/languages.js';
|
import * as languages from '../../common/languages.js';
|
||||||
import { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';
|
import { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';
|
||||||
import { EditorSimpleWorker } from '../../common/services/editorSimpleWorker.js';
|
import { EditorWorker } from '../../common/services/editorWebWorker.js';
|
||||||
import { DiffAlgorithmName, IEditorWorkerService, ILineChange, IUnicodeHighlightsResult } from '../../common/services/editorWorker.js';
|
import { DiffAlgorithmName, IEditorWorkerService, ILineChange, IUnicodeHighlightsResult } from '../../common/services/editorWorker.js';
|
||||||
import { IModelService } from '../../common/services/model.js';
|
import { IModelService } from '../../common/services/model.js';
|
||||||
import { ITextResourceConfigurationService } from '../../common/services/textResourceConfiguration.js';
|
import { ITextResourceConfigurationService } from '../../common/services/textResourceConfiguration.js';
|
||||||
@@ -222,7 +222,7 @@ export abstract class EditorWorkerService extends Disposable implements IEditorW
|
|||||||
return worker.$computeDefaultDocumentColors(uri.toString());
|
return worker.$computeDefaultDocumentColors(uri.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _workerWithResources(resources: URI[], forceLargeModels: boolean = false): Promise<Proxied<EditorSimpleWorker>> {
|
private async _workerWithResources(resources: URI[], forceLargeModels: boolean = false): Promise<Proxied<EditorWorker>> {
|
||||||
const worker = await this._workerManager.withWorker();
|
const worker = await this._workerManager.withWorker();
|
||||||
return await worker.workerWithSyncedResources(resources, forceLargeModels);
|
return await worker.workerWithSyncedResources(resources, forceLargeModels);
|
||||||
}
|
}
|
||||||
@@ -405,7 +405,7 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien
|
|||||||
|
|
||||||
private readonly _modelService: IModelService;
|
private readonly _modelService: IModelService;
|
||||||
private readonly _keepIdleModels: boolean;
|
private readonly _keepIdleModels: boolean;
|
||||||
private _worker: IWebWorkerClient<EditorSimpleWorker> | null;
|
private _worker: IWebWorkerClient<EditorWorker> | null;
|
||||||
private _modelManager: WorkerTextModelSyncClient | null;
|
private _modelManager: WorkerTextModelSyncClient | null;
|
||||||
private _disposed = false;
|
private _disposed = false;
|
||||||
|
|
||||||
@@ -426,10 +426,10 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien
|
|||||||
throw new Error(`Not implemented!`);
|
throw new Error(`Not implemented!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getOrCreateWorker(): IWebWorkerClient<EditorSimpleWorker> {
|
private _getOrCreateWorker(): IWebWorkerClient<EditorWorker> {
|
||||||
if (!this._worker) {
|
if (!this._worker) {
|
||||||
try {
|
try {
|
||||||
this._worker = this._register(createWebWorker<EditorSimpleWorker>(this._workerDescriptorOrWorker));
|
this._worker = this._register(createWebWorker<EditorWorker>(this._workerDescriptorOrWorker));
|
||||||
EditorWorkerHost.setChannel(this._worker, this._createEditorWorkerHost());
|
EditorWorkerHost.setChannel(this._worker, this._createEditorWorkerHost());
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logOnceWebWorkerWarning(err);
|
logOnceWebWorkerWarning(err);
|
||||||
@@ -439,7 +439,7 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien
|
|||||||
return this._worker;
|
return this._worker;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async _getProxy(): Promise<Proxied<EditorSimpleWorker>> {
|
protected async _getProxy(): Promise<Proxied<EditorWorker>> {
|
||||||
try {
|
try {
|
||||||
const proxy = this._getOrCreateWorker().proxy;
|
const proxy = this._getOrCreateWorker().proxy;
|
||||||
await proxy.$ping();
|
await proxy.$ping();
|
||||||
@@ -451,8 +451,8 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _createFallbackLocalWorker(): SynchronousWorkerClient<EditorSimpleWorker> {
|
private _createFallbackLocalWorker(): SynchronousWorkerClient<EditorWorker> {
|
||||||
return new SynchronousWorkerClient(new EditorSimpleWorker(null));
|
return new SynchronousWorkerClient(new EditorWorker(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
private _createEditorWorkerHost(): EditorWorkerHost {
|
private _createEditorWorkerHost(): EditorWorkerHost {
|
||||||
@@ -461,14 +461,14 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getOrCreateModelManager(proxy: Proxied<EditorSimpleWorker>): WorkerTextModelSyncClient {
|
private _getOrCreateModelManager(proxy: Proxied<EditorWorker>): WorkerTextModelSyncClient {
|
||||||
if (!this._modelManager) {
|
if (!this._modelManager) {
|
||||||
this._modelManager = this._register(new WorkerTextModelSyncClient(proxy, this._modelService, this._keepIdleModels));
|
this._modelManager = this._register(new WorkerTextModelSyncClient(proxy, this._modelService, this._keepIdleModels));
|
||||||
}
|
}
|
||||||
return this._modelManager;
|
return this._modelManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async workerWithSyncedResources(resources: URI[], forceLargeModels: boolean = false): Promise<Proxied<EditorSimpleWorker>> {
|
public async workerWithSyncedResources(resources: URI[], forceLargeModels: boolean = false): Promise<Proxied<EditorWorker>> {
|
||||||
if (this._disposed) {
|
if (this._disposed) {
|
||||||
return Promise.reject(canceled());
|
return Promise.reject(canceled());
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -64,7 +64,7 @@ export interface IWordRange {
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export class EditorSimpleWorker implements IDisposable, IWorkerTextModelSyncChannelServer, IWebWorkerServerRequestHandler {
|
export class EditorWorker implements IDisposable, IWorkerTextModelSyncChannelServer, IWebWorkerServerRequestHandler {
|
||||||
_requestHandlerBrand: any;
|
_requestHandlerBrand: any;
|
||||||
|
|
||||||
private readonly _workerTextModelSyncServer = new WorkerTextModelSyncServer();
|
private readonly _workerTextModelSyncServer = new WorkerTextModelSyncServer();
|
||||||
@@ -125,7 +125,7 @@ export class EditorSimpleWorker implements IDisposable, IWorkerTextModelSyncChan
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = EditorSimpleWorker.computeDiff(original, modified, options, algorithm);
|
const result = EditorWorker.computeDiff(original, modified, options, algorithm);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ export class EditorSimpleWorker implements IDisposable, IWorkerTextModelSyncChan
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make sure diff won't take too long
|
// make sure diff won't take too long
|
||||||
if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) {
|
if (Math.max(text.length, original.length) > EditorWorker._diffLimit) {
|
||||||
result.push({ range, text });
|
result.push({ range, text });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -329,7 +329,7 @@ export class EditorSimpleWorker implements IDisposable, IWorkerTextModelSyncChan
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make sure diff won't take too long
|
// make sure diff won't take too long
|
||||||
if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) {
|
if (Math.max(text.length, original.length) > EditorWorker._diffLimit) {
|
||||||
result.push({ range, text });
|
result.push({ range, text });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -430,7 +430,7 @@ export class EditorSimpleWorker implements IDisposable, IWorkerTextModelSyncChan
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
seen.add(word);
|
seen.add(word);
|
||||||
if (seen.size > EditorSimpleWorker._suggestionsLimit) {
|
if (seen.size > EditorWorker._suggestionsLimit) {
|
||||||
break outer;
|
break outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -4,6 +4,6 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { bootstrapWebWorker } from '../../../base/common/worker/webWorkerBootstrap.js';
|
import { bootstrapWebWorker } from '../../../base/common/worker/webWorkerBootstrap.js';
|
||||||
import { EditorSimpleWorker } from './editorSimpleWorker.js';
|
import { EditorWorker } from './editorWebWorker.js';
|
||||||
|
|
||||||
bootstrapWebWorker(() => new EditorSimpleWorker(null));
|
bootstrapWebWorker(() => new EditorWorker(null));
|
||||||
@@ -10,7 +10,7 @@ import { IChange } from '../diff/legacyLinesDiffComputer.js';
|
|||||||
import { IColorInformation, IInplaceReplaceSupportResult, TextEdit } from '../languages.js';
|
import { IColorInformation, IInplaceReplaceSupportResult, TextEdit } from '../languages.js';
|
||||||
import { UnicodeHighlighterOptions } from './unicodeTextModelHighlighter.js';
|
import { UnicodeHighlighterOptions } from './unicodeTextModelHighlighter.js';
|
||||||
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
|
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
|
||||||
import type { EditorSimpleWorker } from './editorSimpleWorker.js';
|
import type { EditorWorker } from './editorWebWorker.js';
|
||||||
import { SectionHeader, FindSectionHeaderOptions } from './findSectionHeaders.js';
|
import { SectionHeader, FindSectionHeaderOptions } from './findSectionHeaders.js';
|
||||||
|
|
||||||
export const IEditorWorkerService = createDecorator<IEditorWorkerService>('editorWorkerService');
|
export const IEditorWorkerService = createDecorator<IEditorWorkerService>('editorWorkerService');
|
||||||
@@ -23,7 +23,7 @@ export interface IEditorWorkerService {
|
|||||||
canComputeUnicodeHighlights(uri: URI): boolean;
|
canComputeUnicodeHighlights(uri: URI): boolean;
|
||||||
computedUnicodeHighlights(uri: URI, options: UnicodeHighlighterOptions, range?: IRange): Promise<IUnicodeHighlightsResult>;
|
computedUnicodeHighlights(uri: URI, options: UnicodeHighlighterOptions, range?: IRange): Promise<IUnicodeHighlightsResult>;
|
||||||
|
|
||||||
/** Implementation in {@link EditorSimpleWorker.computeDiff} */
|
/** Implementation in {@link EditorWorker.computeDiff} */
|
||||||
computeDiff(original: URI, modified: URI, options: IDocumentDiffProviderOptions, algorithm: DiffAlgorithmName): Promise<IDocumentDiff | null>;
|
computeDiff(original: URI, modified: URI, options: IDocumentDiffProviderOptions, algorithm: DiffAlgorithmName): Promise<IDocumentDiff | null>;
|
||||||
|
|
||||||
canComputeDirtyDiff(original: URI, modified: URI): boolean;
|
canComputeDirtyDiff(original: URI, modified: URI): boolean;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { ensureValidWordDefinition, getWordAtText, IWordAtPosition } from '../..
|
|||||||
import { IDocumentColorComputerTarget } from '../../languages/defaultDocumentColorsComputer.js';
|
import { IDocumentColorComputerTarget } from '../../languages/defaultDocumentColorsComputer.js';
|
||||||
import { ILinkComputerTarget } from '../../languages/linkComputer.js';
|
import { ILinkComputerTarget } from '../../languages/linkComputer.js';
|
||||||
import { MirrorTextModel as BaseMirrorModel, IModelChangedEvent } from '../../model/mirrorTextModel.js';
|
import { MirrorTextModel as BaseMirrorModel, IModelChangedEvent } from '../../model/mirrorTextModel.js';
|
||||||
import { IMirrorModel, IWordRange } from '../editorSimpleWorker.js';
|
import { IMirrorModel, IWordRange } from '../editorWebWorker.js';
|
||||||
import { IModelService } from '../model.js';
|
import { IModelService } from '../model.js';
|
||||||
import { IRawModelData, IWorkerTextModelSyncChannelServer } from './textModelSync.protocol.js';
|
import { IRawModelData, IWorkerTextModelSyncChannelServer } from './textModelSync.protocol.js';
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { IRange } from '../../../../common/core/range.js';
|
|||||||
import { DEFAULT_WORD_REGEXP } from '../../../../common/core/wordHelper.js';
|
import { DEFAULT_WORD_REGEXP } from '../../../../common/core/wordHelper.js';
|
||||||
import * as languages from '../../../../common/languages.js';
|
import * as languages from '../../../../common/languages.js';
|
||||||
import { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.js';
|
import { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.js';
|
||||||
import { EditorSimpleWorker } from '../../../../common/services/editorSimpleWorker.js';
|
import { EditorWorker } from '../../../../common/services/editorWebWorker.js';
|
||||||
import { EditorWorkerService } from '../../../../browser/services/editorWorkerService.js';
|
import { EditorWorkerService } from '../../../../browser/services/editorWorkerService.js';
|
||||||
import { IModelService } from '../../../../common/services/model.js';
|
import { IModelService } from '../../../../common/services/model.js';
|
||||||
import { ITextResourceConfigurationService } from '../../../../common/services/textResourceConfiguration.js';
|
import { ITextResourceConfigurationService } from '../../../../common/services/textResourceConfiguration.js';
|
||||||
@@ -62,7 +62,7 @@ suite('suggest, word distance', function () {
|
|||||||
|
|
||||||
const service = new class extends EditorWorkerService {
|
const service = new class extends EditorWorkerService {
|
||||||
|
|
||||||
private _worker = new EditorSimpleWorker();
|
private _worker = new EditorWorker();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(null!, modelService, new class extends mock<ITextResourceConfigurationService>() { }, new NullLogService(), new TestLanguageConfigurationService(), new LanguageFeaturesService());
|
super(null!, modelService, new class extends mock<ITextResourceConfigurationService>() { }, new NullLogService(), new TestLanguageConfigurationService(), new LanguageFeaturesService());
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { initialize } from '../base/common/worker/webWorkerBootstrap.js';
|
import { initialize } from '../base/common/worker/webWorkerBootstrap.js';
|
||||||
import { EditorSimpleWorker, IWorkerContext } from './common/services/editorSimpleWorker.js';
|
import { EditorWorker, IWorkerContext } from './common/services/editorWebWorker.js';
|
||||||
import { EditorWorkerHost } from './common/services/editorWorkerHost.js';
|
import { EditorWorkerHost } from './common/services/editorWorkerHost.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,7 +13,7 @@ import { EditorWorkerHost } from './common/services/editorWorkerHost.js';
|
|||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export function start<THost extends object, TClient extends object>(client: TClient): IWorkerContext<THost> {
|
export function start<THost extends object, TClient extends object>(client: TClient): IWorkerContext<THost> {
|
||||||
const webWorkerServer = initialize(() => new EditorSimpleWorker(client));
|
const webWorkerServer = initialize(() => new EditorWorker(client));
|
||||||
const editorWorkerHost = EditorWorkerHost.getChannel(webWorkerServer);
|
const editorWorkerHost = EditorWorkerHost.getChannel(webWorkerServer);
|
||||||
const host = new Proxy({}, {
|
const host = new Proxy({}, {
|
||||||
get(target, prop, receiver) {
|
get(target, prop, receiver) {
|
||||||
|
|||||||
+3
-3
@@ -8,14 +8,14 @@ import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/c
|
|||||||
import { Position } from '../../../common/core/position.js';
|
import { Position } from '../../../common/core/position.js';
|
||||||
import { IRange, Range } from '../../../common/core/range.js';
|
import { IRange, Range } from '../../../common/core/range.js';
|
||||||
import { TextEdit } from '../../../common/languages.js';
|
import { TextEdit } from '../../../common/languages.js';
|
||||||
import { EditorSimpleWorker } from '../../../common/services/editorSimpleWorker.js';
|
import { EditorWorker } from '../../../common/services/editorWebWorker.js';
|
||||||
import { ICommonModel } from '../../../common/services/textModelSync/textModelSync.impl.js';
|
import { ICommonModel } from '../../../common/services/textModelSync/textModelSync.impl.js';
|
||||||
|
|
||||||
suite('EditorSimpleWorker', () => {
|
suite('EditorWebWorker', () => {
|
||||||
|
|
||||||
ensureNoDisposablesAreLeakedInTestSuite();
|
ensureNoDisposablesAreLeakedInTestSuite();
|
||||||
|
|
||||||
class WorkerWithModels extends EditorSimpleWorker {
|
class WorkerWithModels extends EditorWorker {
|
||||||
|
|
||||||
getModel(uri: string) {
|
getModel(uri: string) {
|
||||||
return this._getModel(uri);
|
return this._getModel(uri);
|
||||||
@@ -19,7 +19,7 @@ export class WorkbenchEditorWorkerService extends EditorWorkerService {
|
|||||||
@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,
|
@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,
|
||||||
@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,
|
@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,
|
||||||
) {
|
) {
|
||||||
const workerDescriptor = new WorkerDescriptor('vs/editor/common/services/editorSimpleWorker', 'TextEditorWorker');
|
const workerDescriptor = new WorkerDescriptor('vs/editor/common/services/editorWebWorker', 'TextEditorWorker');
|
||||||
super(workerDescriptor, modelService, configurationService, logService, languageConfigurationService, languageFeaturesService);
|
super(workerDescriptor, modelService, configurationService, logService, languageConfigurationService, languageFeaturesService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { IModelService } from '../../../../../editor/common/services/model.js';
|
|||||||
import { assertType } from '../../../../../base/common/types.js';
|
import { assertType } from '../../../../../base/common/types.js';
|
||||||
import { DiffAlgorithmName, IEditorWorkerService, ILineChange } from '../../../../../editor/common/services/editorWorker.js';
|
import { DiffAlgorithmName, IEditorWorkerService, ILineChange } from '../../../../../editor/common/services/editorWorker.js';
|
||||||
import { IDocumentDiff, IDocumentDiffProviderOptions } from '../../../../../editor/common/diff/documentDiffProvider.js';
|
import { IDocumentDiff, IDocumentDiffProviderOptions } from '../../../../../editor/common/diff/documentDiffProvider.js';
|
||||||
import { EditorSimpleWorker } from '../../../../../editor/common/services/editorSimpleWorker.js';
|
import { EditorWorker } from '../../../../../editor/common/services/editorWebWorker.js';
|
||||||
import { LineRange } from '../../../../../editor/common/core/lineRange.js';
|
import { LineRange } from '../../../../../editor/common/core/lineRange.js';
|
||||||
import { MovedText } from '../../../../../editor/common/diff/linesDiffComputer.js';
|
import { MovedText } from '../../../../../editor/common/diff/linesDiffComputer.js';
|
||||||
import { LineRangeMapping, DetailedLineRangeMapping, RangeMapping } from '../../../../../editor/common/diff/rangeMapping.js';
|
import { LineRangeMapping, DetailedLineRangeMapping, RangeMapping } from '../../../../../editor/common/diff/rangeMapping.js';
|
||||||
@@ -18,7 +18,7 @@ import { TextEdit } from '../../../../../editor/common/languages.js';
|
|||||||
|
|
||||||
export class TestWorkerService extends mock<IEditorWorkerService>() {
|
export class TestWorkerService extends mock<IEditorWorkerService>() {
|
||||||
|
|
||||||
private readonly _worker = new EditorSimpleWorker();
|
private readonly _worker = new EditorWorker();
|
||||||
|
|
||||||
constructor(@IModelService private readonly _modelService: IModelService) {
|
constructor(@IModelService private readonly _modelService: IModelService) {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -278,8 +278,6 @@ class NotebookWorkerClient extends Disposable {
|
|||||||
'NotebookEditorWorker'
|
'NotebookEditorWorker'
|
||||||
));
|
));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// logOnceWebWorkerWarning(err);
|
|
||||||
// this._worker = new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this), null));
|
|
||||||
throw (err);
|
throw (err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import * as monaco from 'monaco-editor-core';
|
|||||||
|
|
||||||
self.MonacoEnvironment = {
|
self.MonacoEnvironment = {
|
||||||
getWorkerUrl: function (moduleId, label) {
|
getWorkerUrl: function (moduleId, label) {
|
||||||
return './editorSimpleWorkerMain.bundle.js';
|
return './editorWebWorkerMain.bundle.js';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ module.exports = {
|
|||||||
mode: 'production',
|
mode: 'production',
|
||||||
entry: {
|
entry: {
|
||||||
'core': './core.js',
|
'core': './core.js',
|
||||||
'editorSimpleWorkerMain': '../../out-monaco-editor-core/esm/vs/editor/common/services/editorSimpleWorkerMain.js',
|
'editorWebWorkerMain': '../../out-monaco-editor-core/esm/vs/editor/common/services/editorWebWorkerMain.js',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
globalObject: 'self',
|
globalObject: 'self',
|
||||||
|
|||||||
Reference in New Issue
Block a user