mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)
* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 * update distro * fix layering * update distro * fix tests
This commit is contained in:
@@ -35,7 +35,7 @@ import { getDocumentFormattingEditsUntilResult, getDocumentRangeFormattingEditsU
|
||||
import { getLinks } from 'vs/editor/contrib/links/getLinks';
|
||||
import { MainContext, ExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { ExtHostDiagnostics } from 'vs/workbench/api/common/extHostDiagnostics';
|
||||
import * as vscode from 'vscode';
|
||||
import type * as vscode from 'vscode';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import { ITextModel, EndOfLineSequence } from 'vs/editor/common/model';
|
||||
@@ -47,6 +47,7 @@ import { mock } from 'vs/workbench/test/electron-browser/api/mock';
|
||||
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { NullApiDeprecationService } from 'vs/workbench/api/common/extHostApiDeprecationService';
|
||||
|
||||
const defaultSelector = { scheme: 'far' };
|
||||
const model: ITextModel = EditorModel.createFromString(
|
||||
@@ -105,7 +106,7 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
const diagnostics = new ExtHostDiagnostics(rpcProtocol, new NullLogService());
|
||||
rpcProtocol.set(ExtHostContext.ExtHostDiagnostics, diagnostics);
|
||||
|
||||
extHost = new ExtHostLanguageFeatures(rpcProtocol, null, extHostDocuments, commands, diagnostics, new NullLogService());
|
||||
extHost = new ExtHostLanguageFeatures(rpcProtocol, null, extHostDocuments, commands, diagnostics, new NullLogService(), NullApiDeprecationService);
|
||||
rpcProtocol.set(ExtHostContext.ExtHostLanguageFeatures, extHost);
|
||||
|
||||
mainThread = rpcProtocol.set(MainContext.MainThreadLanguageFeatures, inst.createInstance(MainThreadLanguageFeatures, rpcProtocol));
|
||||
@@ -589,7 +590,7 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: 'manual' }, CancellationToken.None);
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: modes.CodeActionTriggerType.Manual }, CancellationToken.None);
|
||||
assert.equal(actions.length, 2);
|
||||
const [first, second] = actions;
|
||||
assert.equal(first.title, 'Testing1');
|
||||
@@ -613,7 +614,7 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: 'manual' }, CancellationToken.None);
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: modes.CodeActionTriggerType.Manual }, CancellationToken.None);
|
||||
assert.equal(actions.length, 1);
|
||||
const [first] = actions;
|
||||
assert.equal(first.title, 'Testing1');
|
||||
@@ -636,7 +637,7 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: 'manual' }, CancellationToken.None);
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: modes.CodeActionTriggerType.Manual }, CancellationToken.None);
|
||||
assert.equal(actions.length, 1);
|
||||
});
|
||||
|
||||
@@ -654,7 +655,7 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: 'manual' }, CancellationToken.None);
|
||||
const { validActions: actions } = await getCodeActions(model, model.getFullModelRange(), { type: modes.CodeActionTriggerType.Manual }, CancellationToken.None);
|
||||
assert.equal(actions.length, 1);
|
||||
});
|
||||
|
||||
@@ -758,8 +759,8 @@ suite('ExtHostLanguageFeatures', function () {
|
||||
const value = await rename(model, new EditorPosition(1, 1), 'newName');
|
||||
// least relevant rename provider
|
||||
assert.equal(value.edits.length, 2);
|
||||
assert.equal((<modes.ResourceTextEdit>value.edits[0]).edits.length, 1);
|
||||
assert.equal((<modes.ResourceTextEdit>value.edits[1]).edits.length, 1);
|
||||
assert.equal((<modes.WorkspaceTextEdit>value.edits[0]).edits.length, 1);
|
||||
assert.equal((<modes.WorkspaceTextEdit>value.edits[1]).edits.length, 1);
|
||||
});
|
||||
|
||||
// --- parameter hints
|
||||
|
||||
Reference in New Issue
Block a user