mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 09:35:40 -05:00
Merge vscode source through 1.62 release (#19981)
* Build breaks 1 * Build breaks * Build breaks * Build breaks * More build breaks * Build breaks (#2512) * Runtime breaks * Build breaks * Fix dialog location break * Update typescript * Fix ASAR break issue * Unit test breaks * Update distro * Fix breaks in ADO builds (#2513) * Bump to node 16 * Fix hygiene errors * Bump distro * Remove reference to node type * Delete vscode specific extension * Bump to node 16 in CI yaml * Skip integration tests in CI builds (while fixing) * yarn.lock update * Bump moment dependency in remote yarn * Fix drop-down chevron style * Bump to node 16 * Remove playwrite from ci.yaml * Skip building build scripts in hygine check
This commit is contained in:
@@ -10,12 +10,13 @@ import { IQueryModelService } from 'sql/workbench/services/query/common/queryMod
|
||||
|
||||
import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IMoveResult, GroupIdentifier, ISaveOptions, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IMoveResult, GroupIdentifier, ISaveOptions } from 'vs/workbench/common/editor';
|
||||
import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel';
|
||||
import { EncodingMode, ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { FILE_QUERY_EDITOR_TYPEID } from 'sql/workbench/common/constants';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
|
||||
export class FileQueryEditorInput extends QueryEditorInput {
|
||||
|
||||
@@ -85,11 +86,11 @@ export class FileQueryEditorInput extends QueryEditorInput {
|
||||
return this.text.isResolved();
|
||||
}
|
||||
|
||||
public override rename(group: GroupIdentifier, target: URI): IMoveResult {
|
||||
public override async rename(group: GroupIdentifier, target: URI): Promise<IMoveResult> {
|
||||
return this.text.rename(group, target);
|
||||
}
|
||||
|
||||
override async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
|
||||
override async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | undefined> {
|
||||
let newEditorInput = await this.text.saveAs(group, options);
|
||||
let newUri = newEditorInput.resource.toString(true);
|
||||
if (newUri === this.uri) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';
|
||||
import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IStatusbarService, StatusbarAlignment, IStatusbarEntryAccessor, IStatusbarEntry } from 'vs/workbench/services/statusbar/common/statusbar';
|
||||
import { IStatusbarService, StatusbarAlignment, IStatusbarEntryAccessor, IStatusbarEntry } from 'vs/workbench/services/statusbar/browser/statusbar';
|
||||
|
||||
export interface ISqlProviderEntry extends IQuickPickItem {
|
||||
providerId: string;
|
||||
|
||||
@@ -140,7 +140,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
EstimatedExecutionPlanKeyboardAction,
|
||||
EstimatedExecutionPlanKeyboardAction.ID,
|
||||
EstimatedExecutionPlanKeyboardAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyCode.KEY_L }
|
||||
{ primary: KeyMod.CtrlCmd | KeyCode.KeyL }
|
||||
),
|
||||
EstimatedExecutionPlanKeyboardAction.LABEL,
|
||||
CATEGORIES.ExecutionPlan.value
|
||||
@@ -151,7 +151,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
ToggleActualPlanKeyboardAction,
|
||||
ToggleActualPlanKeyboardAction.ID,
|
||||
ToggleActualPlanKeyboardAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyCode.KEY_M }
|
||||
{ primary: KeyMod.CtrlCmd | KeyCode.KeyM }
|
||||
),
|
||||
ToggleActualPlanKeyboardAction.LABEL,
|
||||
CATEGORIES.ExecutionPlan.value
|
||||
@@ -162,7 +162,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
CopyQueryWithResultsKeyboardAction,
|
||||
CopyQueryWithResultsKeyboardAction.ID,
|
||||
CopyQueryWithResultsKeyboardAction.LABEL,
|
||||
{ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_V) }
|
||||
{ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyV) }
|
||||
),
|
||||
CopyQueryWithResultsKeyboardAction.LABEL
|
||||
);
|
||||
@@ -191,7 +191,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
FocusOnCurrentQueryKeyboardAction,
|
||||
FocusOnCurrentQueryKeyboardAction.ID,
|
||||
FocusOnCurrentQueryKeyboardAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O }
|
||||
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyO }
|
||||
),
|
||||
FocusOnCurrentQueryKeyboardAction.LABEL
|
||||
);
|
||||
@@ -212,7 +212,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
ToggleQueryResultsKeyboardAction,
|
||||
ToggleQueryResultsKeyboardAction.ID,
|
||||
ToggleQueryResultsKeyboardAction.LABEL,
|
||||
{ primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R },
|
||||
{ primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyR },
|
||||
QueryEditorVisibleCondition
|
||||
),
|
||||
ToggleQueryResultsKeyboardAction.LABEL
|
||||
@@ -223,7 +223,7 @@ actionRegistry.registerWorkbenchAction(
|
||||
ToggleFocusBetweenQueryEditorAndResultsAction,
|
||||
ToggleFocusBetweenQueryEditorAndResultsAction.ID,
|
||||
ToggleFocusBetweenQueryEditorAndResultsAction.LABEL,
|
||||
{ primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_F },
|
||||
{ primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyF },
|
||||
QueryEditorVisibleCondition
|
||||
),
|
||||
ToggleFocusBetweenQueryEditorAndResultsAction.LABEL
|
||||
@@ -243,7 +243,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_COPY_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: gridCommands.copySelection
|
||||
});
|
||||
|
||||
@@ -251,7 +251,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.MESSAGES_SELECTALL_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsMessagesFocusCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_A,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
||||
handler: gridCommands.selectAllMessages
|
||||
});
|
||||
|
||||
@@ -259,7 +259,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_SELECTALL_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_A,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
||||
handler: gridCommands.selectAll
|
||||
});
|
||||
|
||||
@@ -267,7 +267,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.MESSAGES_COPY_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsMessagesFocusCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyC,
|
||||
handler: gridCommands.copyMessagesSelection
|
||||
});
|
||||
|
||||
@@ -275,7 +275,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_SAVECSV_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_C),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyC),
|
||||
handler: gridCommands.saveAsCsv
|
||||
});
|
||||
|
||||
@@ -283,7 +283,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_SAVEJSON_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_J),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyJ),
|
||||
handler: gridCommands.saveAsJson
|
||||
});
|
||||
|
||||
@@ -291,7 +291,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_SAVEEXCEL_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_E),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyE),
|
||||
handler: gridCommands.saveAsExcel
|
||||
});
|
||||
|
||||
@@ -299,7 +299,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_SAVEXML_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_X),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyX),
|
||||
handler: gridCommands.saveAsXml
|
||||
});
|
||||
|
||||
@@ -307,7 +307,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_VIEWASCHART_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_V),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyV),
|
||||
handler: gridCommands.viewAsChart
|
||||
});
|
||||
|
||||
@@ -315,7 +315,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GRID_GOTONEXTGRID_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: ResultsGridFocusCondition,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_R, KeyMod.CtrlCmd | KeyCode.KEY_N),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyR, KeyMod.CtrlCmd | KeyCode.KeyN),
|
||||
handler: gridCommands.goToNextGrid
|
||||
});
|
||||
|
||||
@@ -323,7 +323,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.TOGGLERESULTS_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: QueryEditorVisibleCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyR,
|
||||
handler: gridCommands.toggleResultsPane
|
||||
});
|
||||
|
||||
@@ -331,7 +331,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.TOGGLEMESSAGES_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: QueryEditorVisibleCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Y,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyY,
|
||||
handler: gridCommands.toggleMessagePane
|
||||
});
|
||||
|
||||
@@ -339,7 +339,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: gridActions.GOTONEXTQUERYOUTPUTTAB_ID,
|
||||
weight: KeybindingWeight.EditorContrib,
|
||||
when: QueryEditorVisibleCondition,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyP,
|
||||
handler: gridCommands.goToNextQueryOutputTab
|
||||
});
|
||||
|
||||
@@ -458,8 +458,8 @@ const queryEditorConfiguration: IConfigurationNode = {
|
||||
const initialShortcuts = [
|
||||
{ name: 'sp_help', primary: KeyMod.Alt + KeyCode.F2 },
|
||||
// Note: using Ctrl+Shift+N since Ctrl+N is used for "open editor at index" by default. This means it's different from SSMS
|
||||
{ name: 'sp_who', primary: KeyMod.WinCtrl + KeyMod.Shift + KeyCode.KEY_1 },
|
||||
{ name: 'sp_lock', primary: KeyMod.WinCtrl + KeyMod.Shift + KeyCode.KEY_2 }
|
||||
{ name: 'sp_who', primary: KeyMod.WinCtrl + KeyMod.Shift + KeyCode.Digit1 },
|
||||
{ name: 'sp_lock', primary: KeyMod.WinCtrl + KeyMod.Shift + KeyCode.Digit2 }
|
||||
];
|
||||
|
||||
const shortCutConfiguration: IConfigurationNode = {
|
||||
|
||||
@@ -45,6 +45,7 @@ import { IEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
|
||||
import { ConnectionOptionSpecialType } from 'sql/platform/connection/common/interfaces';
|
||||
import { ICodeEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
|
||||
const QUERY_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'queryEditorViewState';
|
||||
|
||||
@@ -69,7 +70,7 @@ export class QueryEditor extends EditorPane {
|
||||
|
||||
private textResourceEditor: TextResourceEditor;
|
||||
private textFileEditor: TextFileEditor;
|
||||
private currentTextEditor: BaseTextEditor;
|
||||
private currentTextEditor: BaseTextEditor<ICodeEditorViewState>;
|
||||
|
||||
private textResourceEditorContainer: HTMLElement;
|
||||
private textFileEditorContainer: HTMLElement;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IEditorFactoryRegistry, IEditorInput, IEditorSerializer, EditorExtensions } from 'vs/workbench/common/editor';
|
||||
import { IEditorFactoryRegistry, IEditorSerializer, EditorExtensions } from 'vs/workbench/common/editor';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { QueryResultsInput } from 'sql/workbench/common/editor/query/queryResultsInput';
|
||||
@@ -23,6 +23,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
import { IQueryEditorConfiguration } from 'sql/platform/query/common/query';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
|
||||
const editorFactoryRegistry = Registry.as<IEditorFactoryRegistry>(EditorExtensions.EditorFactory);
|
||||
|
||||
@@ -41,7 +42,7 @@ export class QueryEditorLanguageAssociation implements ILanguageAssociation {
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IQueryEditorService private readonly queryEditorService: IQueryEditorService) { }
|
||||
|
||||
async convertInput(activeEditor: IEditorInput): Promise<QueryEditorInput | undefined> {
|
||||
async convertInput(activeEditor: EditorInput): Promise<QueryEditorInput | undefined> {
|
||||
if (!(activeEditor instanceof FileEditorInput) && !(activeEditor instanceof UntitledTextEditorInput)) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -61,7 +62,7 @@ export class QueryEditorLanguageAssociation implements ILanguageAssociation {
|
||||
return queryEditorInput;
|
||||
}
|
||||
|
||||
syncConvertInput(activeEditor: IEditorInput): QueryEditorInput | undefined {
|
||||
syncConvertInput(activeEditor: EditorInput): QueryEditorInput | undefined {
|
||||
const queryResultsInput = this.instantiationService.createInstance(QueryResultsInput, activeEditor.resource.toString(true));
|
||||
let queryEditorInput: QueryEditorInput;
|
||||
if (activeEditor instanceof FileEditorInput) {
|
||||
@@ -94,7 +95,7 @@ export class QueryEditorLanguageAssociation implements ILanguageAssociation {
|
||||
}
|
||||
}
|
||||
|
||||
createBase(activeEditor: QueryEditorInput): IEditorInput {
|
||||
createBase(activeEditor: QueryEditorInput): EditorInput {
|
||||
return activeEditor.text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment } from 'vs/workbench/services/statusbar/common/statusbar';
|
||||
import { IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment } from 'vs/workbench/services/statusbar/browser/statusbar';
|
||||
export class TimeElapsedStatusBarContributions extends Disposable implements IWorkbenchContribution {
|
||||
|
||||
private static readonly ID = 'status.query.timeElapsed';
|
||||
|
||||
@@ -8,7 +8,6 @@ import * as sinon from 'sinon';
|
||||
import { ITestInstantiationService, TestEditorService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput';
|
||||
import { workbenchInstantiationService } from 'sql/workbench/test/workbenchTestServices';
|
||||
import { QueryEditorLanguageAssociation } from 'sql/workbench/contrib/query/browser/queryEditorFactory';
|
||||
@@ -27,6 +26,7 @@ import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/q
|
||||
import { QueryResultsInput } from 'sql/workbench/common/editor/query/queryResultsInput';
|
||||
import { extUri } from 'vs/base/common/resources';
|
||||
import { IResourceEditorInputIdentifier } from 'vs/platform/editor/common/editor';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
|
||||
suite('Query Input Factory', () => {
|
||||
let instantiationService: ITestInstantiationService;
|
||||
@@ -337,8 +337,8 @@ class ServiceAccessor {
|
||||
}
|
||||
|
||||
class MockEditorService extends TestEditorService {
|
||||
private __activeEditor: IEditorInput | undefined = undefined;
|
||||
public override get activeEditor(): IEditorInput | undefined {
|
||||
private __activeEditor: EditorInput | undefined = undefined;
|
||||
public override get activeEditor(): EditorInput | undefined {
|
||||
return this.__activeEditor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user