未验证 提交 a28cf53a 编写于 作者: J Johannes Rieken 提交者: GitHub

Merge pull request #108386 from tony-xia/dispoables2disposable

dispoables -> disposable
......@@ -168,7 +168,7 @@ class CompletionItemModel {
constructor(
readonly items: CompletionItem[],
readonly needsClipboard: boolean,
readonly dispoables: IDisposable,
readonly disposable: IDisposable,
) { }
}
......@@ -343,7 +343,7 @@ registerDefaultLanguageCommand('_executeCompletionItemProvider', async (model, p
await Promise.all(resolving);
return result;
} finally {
setTimeout(() => completions.dispoables.dispose(), 100);
setTimeout(() => completions.disposable.dispose(), 100);
}
});
......
......@@ -468,7 +468,7 @@ export class SuggestModel implements IDisposable {
);
// store containers so that they can be disposed later
this._completionDisposables.add(completions.dispoables);
this._completionDisposables.add(completions.disposable);
this._onNewContext(ctx);
......
......@@ -59,7 +59,7 @@ registerAction2(class extends Action2 {
}
const notebook = editor.viewModel.notebookDocument;
const dispoables = new DisposableStore();
const disposable = new DisposableStore();
try {
const edits: ResourceTextEdit[] = [];
......@@ -67,7 +67,7 @@ registerAction2(class extends Action2 {
for (const cell of notebook.cells) {
const ref = await textModelService.createModelReference(cell.uri);
dispoables.add(ref);
disposable.add(ref);
const model = ref.object.textEditorModel;
......@@ -86,7 +86,7 @@ registerAction2(class extends Action2 {
await bulkEditService.apply(edits, { label: localize('label', "Format Notebook") });
} finally {
dispoables.dispose();
disposable.dispose();
}
}
});
......
......@@ -103,7 +103,7 @@ suite('CommandService', function () {
test('Stop waiting for * extensions to activate when trigger is satisfied #62457', function () {
let callCounter = 0;
const dispoables = new DisposableStore();
const disposable = new DisposableStore();
let events: string[] = [];
let service = new CommandService(new InstantiationService(), new class extends NullExtensionService {
......@@ -118,7 +118,7 @@ suite('CommandService', function () {
let reg = CommandsRegistry.registerCommand(event.substr('onCommand:'.length), () => {
callCounter += 1;
});
dispoables.add(reg);
disposable.add(reg);
resolve();
}, 0);
});
......@@ -132,7 +132,7 @@ suite('CommandService', function () {
assert.equal(callCounter, 1);
assert.deepEqual(events.sort(), ['*', 'onCommand:farboo'].sort());
}).finally(() => {
dispoables.dispose();
disposable.dispose();
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册