mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 17:23:21 -05:00
Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)
* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 * Bump distro * Upgrade GCC to 4.9 due to yarn install errors * Update build image * Fix bootstrap base url * Bump distro * Fix build errors * Update source map file * Disable checkbox for blocking migration issues (#15131) * disable checkbox for blocking issues * wip * disable checkbox fixes * fix strings * Remove duplicate tsec command * Default to off for tab color if settings not present * re-skip failing tests * Fix mocha error * Bump sqlite version & fix notebooks search view * Turn off esbuild warnings * Update esbuild log level * Fix overflowactionbar tests * Fix ts-ignore in dropdown tests * cleanup/fixes * Fix hygiene * Bundle in entire zone.js module * Remove extra constructor param * bump distro for web compile break * bump distro for web compile break v2 * Undo log level change * New distro * Fix integration test scripts * remove the "no yarn.lock changes" workflow * fix scripts v2 * Update unit test scripts * Ensure ads-kerberos2 updates in .vscodeignore * Try fix unit tests * Upload crash reports * remove nogpu * always upload crashes * Use bash script * Consolidate data/ext dir names * Create in tmp directory Co-authored-by: chlafreniere <hichise@gmail.com> Co-authored-by: Christopher Suh <chsuh@microsoft.com> Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
35
src/sql/workbench/browser/actions/layoutActions.ts
Normal file
35
src/sql/workbench/browser/actions/layoutActions.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { FocusedViewContext, IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
|
||||
// --- Toggle View with Command
|
||||
export abstract class ToggleViewAction extends Action {
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
private readonly viewId: string,
|
||||
protected viewsService: IViewsService,
|
||||
protected viewDescriptorService: IViewDescriptorService,
|
||||
protected contextKeyService: IContextKeyService,
|
||||
private layoutService: IWorkbenchLayoutService,
|
||||
cssClass?: string
|
||||
) {
|
||||
super(id, label, cssClass);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
const focusedViewId = FocusedViewContext.getValue(this.contextKeyService);
|
||||
|
||||
if (focusedViewId === this.viewId) {
|
||||
if (this.viewDescriptorService.getViewLocationById(this.viewId) === ViewContainerLocation.Sidebar) {
|
||||
this.layoutService.setSideBarHidden(true);
|
||||
} else {
|
||||
this.layoutService.setPanelHidden(true);
|
||||
}
|
||||
} else {
|
||||
this.viewsService.openView(this.viewId, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
const container = DOM.append(this._modalHeaderSection, DOM.$('.modal-go-back'));
|
||||
this._backButton = new Button(container, { secondary: true });
|
||||
this._backButton.icon = {
|
||||
classNames: 'backButtonIcon'
|
||||
id: 'backButtonIcon'
|
||||
};
|
||||
this._backButton.title = localize('modal.back', "Back");
|
||||
}
|
||||
@@ -262,21 +262,21 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
this._detailsButtonContainer = DOM.append(headerContainer, DOM.$('.dialog-message-button'));
|
||||
this._toggleMessageDetailButton = new Button(this._detailsButtonContainer);
|
||||
this._toggleMessageDetailButton.icon = {
|
||||
classNames: 'message-details-icon'
|
||||
id: 'message-details-icon'
|
||||
};
|
||||
this._toggleMessageDetailButton.label = SHOW_DETAILS_TEXT;
|
||||
this._register(this._toggleMessageDetailButton.onDidClick(() => this.toggleMessageDetail()));
|
||||
const copyMessageButtonContainer = DOM.append(headerContainer, DOM.$('.dialog-message-button'));
|
||||
this._copyMessageButton = new Button(copyMessageButtonContainer);
|
||||
this._copyMessageButton.icon = {
|
||||
classNames: 'copy-message-icon'
|
||||
id: 'copy-message-icon'
|
||||
};
|
||||
this._copyMessageButton.label = COPY_TEXT;
|
||||
this._register(this._copyMessageButton.onDidClick(() => this._clipboardService.writeText(this.getTextForClipboard())));
|
||||
const closeMessageButtonContainer = DOM.append(headerContainer, DOM.$('.dialog-message-button'));
|
||||
this._closeMessageButton = new Button(closeMessageButtonContainer);
|
||||
this._closeMessageButton.icon = {
|
||||
classNames: 'close-message-icon'
|
||||
id: 'close-message-icon'
|
||||
};
|
||||
this._closeMessageButton.label = CLOSE_TEXT;
|
||||
this._register(this._closeMessageButton.onDidClick(() => this.setError(undefined)));
|
||||
|
||||
@@ -177,7 +177,7 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
if (!this._iconClass) {
|
||||
super.updateIcon();
|
||||
this._button.icon = {
|
||||
classNames: this._iconClass + ' icon'
|
||||
id: this._iconClass + ' icon'
|
||||
};
|
||||
this.updateStyler();
|
||||
} else {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IEditorOptions, EditorOption, InDiffEditorState } from 'vs/editor/common/config/editorOptions';
|
||||
import { IEditorOptions, EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel';
|
||||
@@ -58,7 +58,7 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
protected getConfigurationOverrides(): IEditorOptions {
|
||||
const options = super.getConfigurationOverrides();
|
||||
if (this.input) {
|
||||
options.inDiffEditor = InDiffEditorState.None;
|
||||
options.inDiffEditor = false;
|
||||
options.scrollBeyondLastLine = false;
|
||||
options.folding = false;
|
||||
options.renderIndentGuides = false;
|
||||
|
||||
@@ -62,7 +62,7 @@ export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implem
|
||||
if (elements) {
|
||||
for (const element of elements) {
|
||||
const resolvable = new ResolvableTreeComponentItem(element, hasResolve ? () => {
|
||||
return this._proxy.$resolve(this.treeViewId, element.handle);
|
||||
return this._proxy.$resolve(this.treeViewId, element.handle, undefined);
|
||||
} : undefined);
|
||||
this.itemsMap.set(element.handle, resolvable);
|
||||
result.push(resolvable);
|
||||
|
||||
@@ -24,7 +24,7 @@ import { IConnectionManagementService } from 'sql/platform/connection/common/con
|
||||
import { TestConnectionManagementService } from 'sql/platform/connection/test/common/testConnectionManagementService';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { OpenerServiceStub } from 'sql/platform/opener/common/openerServiceStub';
|
||||
import { OpenerServiceStub } from 'sql/workbench/contrib/opener/common/openerServiceStub';
|
||||
import { SqlAssessmentTargetType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { TestFileService, TestEnvironmentService, TestFileDialogService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from 'sql/workbench/services/objectExplorer/browser/connectionTreeAction';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
@@ -6,27 +6,14 @@
|
||||
import 'vs/css!./media/dataExplorer.contribution';
|
||||
import { localize } from 'vs/nls';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { DataExplorerViewletViewsContribution, OpenDataExplorerViewletAction } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
|
||||
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { DataExplorerContainerExtensionHandler } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint';
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { DataExplorerViewletViewsContribution } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
|
||||
|
||||
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
|
||||
workbenchRegistry.registerWorkbenchContribution(DataExplorerViewletViewsContribution, LifecyclePhase.Starting);
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(
|
||||
SyncActionDescriptor.create(
|
||||
OpenDataExplorerViewletAction,
|
||||
OpenDataExplorerViewletAction.ID,
|
||||
OpenDataExplorerViewletAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_D }),
|
||||
'View: Show Data Explorer',
|
||||
localize('dataExplorer.view', "View")
|
||||
);
|
||||
|
||||
let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration);
|
||||
configurationRegistry.registerConfiguration({
|
||||
|
||||
@@ -22,30 +22,14 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ShowViewletAction, Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ViewPaneContainer, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.connections';
|
||||
|
||||
// Viewlet Action
|
||||
export class OpenDataExplorerViewletAction extends ShowViewletAction {
|
||||
public static ID = VIEWLET_ID;
|
||||
public static LABEL = localize('showDataExplorer', "Show Connections");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IViewletService viewletService: IViewletService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
|
||||
}
|
||||
}
|
||||
|
||||
export class DataExplorerViewletViewsContribution implements IWorkbenchContribution {
|
||||
|
||||
constructor() {
|
||||
@@ -152,9 +136,15 @@ export const dataExplorerIconId = 'dataExplorer';
|
||||
|
||||
export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: localize('dataexplorer.name', "Connections"),
|
||||
title: localize('dataexplorer.name', "Connections"),
|
||||
ctorDescriptor: new SyncDescriptor(DataExplorerViewPaneContainer),
|
||||
openCommandActionDescriptor: {
|
||||
id: VIEWLET_ID,
|
||||
mnemonicTitle: localize('showDataExplorer', "Show Connections"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_D },
|
||||
order: 0
|
||||
},
|
||||
icon: { id: 'dataExplorer' },
|
||||
order: 0,
|
||||
storageId: `${VIEWLET_ID}.state`
|
||||
}, ViewContainerLocation.Sidebar, true);
|
||||
}, ViewContainerLocation.Sidebar, { isDefault: true });
|
||||
|
||||
@@ -71,7 +71,8 @@ export class NotebookFindModel extends Disposable implements INotebookFindModel
|
||||
|
||||
this._decorations = Object.create(null);
|
||||
|
||||
this._buffer = createTextBuffer('', NotebookFindModel.DEFAULT_CREATION_OPTIONS.defaultEOL);
|
||||
const { textBuffer, } = createTextBuffer('', NotebookFindModel.DEFAULT_CREATION_OPTIONS.defaultEOL);
|
||||
this._buffer = textBuffer;
|
||||
this._versionId = 1;
|
||||
this.id = '$model' + MODEL_ID;
|
||||
}
|
||||
@@ -287,7 +288,8 @@ export class NotebookFindModel extends Disposable implements INotebookFindModel
|
||||
*/
|
||||
private _validateRangeRelaxedNoAllocations(range: IRange): NotebookRange {
|
||||
if (range instanceof NotebookRange) {
|
||||
this._buffer = createTextBuffer(range.cell.source instanceof Array ? range.cell.source.join('\n') : range.cell.source, NotebookFindModel.DEFAULT_CREATION_OPTIONS.defaultEOL);
|
||||
const { textBuffer, } = createTextBuffer(range.cell.source instanceof Array ? range.cell.source.join('\n') : range.cell.source, NotebookFindModel.DEFAULT_CREATION_OPTIONS.defaultEOL);
|
||||
this._buffer = textBuffer;
|
||||
}
|
||||
|
||||
const linesCount = this._buffer.getLineCount();
|
||||
|
||||
@@ -260,7 +260,13 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
let errorWithAction = createErrorWithActions(toErrorMessage(error), {
|
||||
actions: [
|
||||
new Action('workbench.files.action.createMissingFile', localize('createFile', "Create File"), undefined, true, () => {
|
||||
return this.textFileService.create(this.notebookParams.notebookUri).then(() => this.editorService.openEditor({
|
||||
let operations = new Array(1);
|
||||
operations[0] = {
|
||||
resource: this.notebookParams.notebookUri,
|
||||
value: undefined,
|
||||
options: undefined
|
||||
};
|
||||
return this.textFileService.create(operations).then(() => this.editorService.openEditor({
|
||||
resource: this.notebookParams.notebookUri,
|
||||
options: {
|
||||
pinned: true // new file gets pinned by default
|
||||
|
||||
@@ -46,7 +46,7 @@ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } fr
|
||||
import { NotebookThemingContribution } from 'sql/workbench/contrib/notebook/browser/notebookThemingContribution';
|
||||
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode';
|
||||
import { NotebookExplorerViewletViewsContribution, OpenNotebookExplorerViewletAction } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
|
||||
import { NotebookExplorerViewletViewsContribution } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
|
||||
import 'vs/css!./media/notebook.contribution';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { SearchSortOrder } from 'vs/workbench/services/search/common/search';
|
||||
@@ -439,16 +439,6 @@ registerCellComponent(TextCellComponent);
|
||||
|
||||
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
|
||||
workbenchRegistry.registerWorkbenchContribution(NotebookExplorerViewletViewsContribution, LifecyclePhase.Starting);
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionsExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(
|
||||
SyncActionDescriptor.create(
|
||||
OpenNotebookExplorerViewletAction,
|
||||
OpenNotebookExplorerViewletAction.ID,
|
||||
OpenNotebookExplorerViewletAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_B }),
|
||||
'View: Show Notebook Explorer',
|
||||
localize('notebookExplorer.view', "View")
|
||||
);
|
||||
|
||||
// Configuration
|
||||
configurationRegistry.registerConfiguration({
|
||||
|
||||
@@ -21,10 +21,9 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ShowViewletAction, Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ViewPaneContainer, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { NotebookSearchWidget, INotebookExplorerSearchOptions } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearchWidget';
|
||||
import * as Constants from 'sql/workbench/common/constants';
|
||||
@@ -44,22 +43,6 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.notebooks';
|
||||
|
||||
// Viewlet Action
|
||||
export class OpenNotebookExplorerViewletAction extends ShowViewletAction {
|
||||
public static ID = VIEWLET_ID;
|
||||
public static LABEL = localize('showNotebookExplorer', "Show Notebooks");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IViewletService viewletService: IViewletService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
|
||||
}
|
||||
}
|
||||
|
||||
export class NotebookExplorerViewletViewsContribution implements IWorkbenchContribution {
|
||||
|
||||
constructor() {
|
||||
@@ -450,7 +433,7 @@ export const notebookIconId = 'book';
|
||||
|
||||
export const NOTEBOOK_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: localize('notebookExplorer.name', "Notebooks"),
|
||||
title: localize('notebookExplorer.name', "Notebooks"),
|
||||
ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer),
|
||||
icon: { id: notebookIconId },
|
||||
order: 6,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { SearchView, SearchUIState } from 'vs/workbench/contrib/search/browser/searchView';
|
||||
import { IViewPaneOptions, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SearchView } from 'vs/workbench/contrib/search/browser/searchView';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
@@ -43,6 +43,7 @@ import { searchClearIcon, searchCollapseAllIcon, searchExpandAllIcon, searchStop
|
||||
import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { Memento } from 'vs/workbench/common/memento';
|
||||
import { SearchUIState } from 'vs/workbench/contrib/search/common/search';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
|
||||
@@ -119,10 +120,6 @@ export class NotebookSearchView extends SearchView {
|
||||
}
|
||||
|
||||
public updateActions(): void {
|
||||
if (!this.isVisible()) {
|
||||
this.updatedActionsWhileHidden = true;
|
||||
}
|
||||
|
||||
for (const action of this.viewActions) {
|
||||
action.update();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
import { nb } from 'azdata';
|
||||
import * as assert from 'assert';
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as tempWrite from 'temp-write';
|
||||
import { LocalContentManager } from 'sql/workbench/services/notebook/common/localContentManager';
|
||||
@@ -13,9 +16,9 @@ import { CellTypes } from 'sql/workbench/services/notebook/common/contracts';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { TestFileService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { IFileService, IReadFileOptions, IFileContent, IWriteFileOptions, IFileStatWithMetadata } from 'vs/platform/files/common/files';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
import { VSBuffer, VSBufferReadable } from 'vs/base/common/buffer';
|
||||
import { isUndefinedOrNull } from 'vs/base/common/types';
|
||||
import { promisify } from 'util';
|
||||
|
||||
let expectedNotebookContent: nb.INotebookContents = {
|
||||
cells: [{
|
||||
@@ -53,7 +56,8 @@ suite('Local Content Manager', function (): void {
|
||||
const instantiationService = new TestInstantiationService();
|
||||
const fileService = new class extends TestFileService {
|
||||
async readFile(resource: URI, options?: IReadFileOptions | undefined): Promise<IFileContent> {
|
||||
const content = await pfs.readFile(resource.fsPath);
|
||||
const content = await promisify(fs.readFile)(resource.fsPath);
|
||||
|
||||
return { name: ',', size: 0, etag: '', mtime: 0, value: VSBuffer.fromString(content.toString()), resource, ctime: 0 };
|
||||
}
|
||||
async writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable, options?: IWriteFileOptions): Promise<IFileStatWithMetadata> {
|
||||
|
||||
@@ -977,7 +977,7 @@ suite('Notebook Editor Model', function (): void {
|
||||
await notebookModel.loadContents();
|
||||
}
|
||||
|
||||
async function createTextEditorModel(self: Mocha.ITestCallbackContext): Promise<NotebookEditorModel> {
|
||||
async function createTextEditorModel(self: Mocha.Context): Promise<NotebookEditorModel> {
|
||||
let textFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(self, defaultUri.toString()), 'utf8', undefined);
|
||||
(<TestTextFileEditorModelManager>accessor.textFileService.files).add(textFileEditorModel.resource, textFileEditorModel);
|
||||
await textFileEditorModel.load();
|
||||
|
||||
38
src/sql/workbench/contrib/opener/common/openerServiceStub.ts
Normal file
38
src/sql/workbench/contrib/opener/common/openerServiceStub.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IOpenerService, IOpener, IValidator, IExternalUriResolver, IExternalOpener, ResolveExternalUriOptions, IResolvedExternalUri } from 'vs/platform/opener/common/opener';
|
||||
import { IExternalOpenerProvider } from 'vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
|
||||
export class OpenerServiceStub implements IOpenerService {
|
||||
registerOpener(opener: IOpener): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
registerValidator(validator: IValidator): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
registerExternalUriResolver(resolver: IExternalUriResolver): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
setExternalOpener(opener: IExternalOpener): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
_serviceBrand: undefined;
|
||||
async open(resource: URI | string, options?: any): Promise<boolean> { return Promise.resolve(true); }
|
||||
setDefaultExternalOpener(opener: IExternalOpener): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
registerExternalOpenerProvider(provider: IExternalOpenerProvider): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
registerExternalOpener(opener: IExternalOpener): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IEditorOptions, InDiffEditorState } from 'vs/editor/common/config/editorOptions';
|
||||
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel';
|
||||
@@ -60,7 +60,7 @@ export class ProfilerResourceEditor extends BaseTextEditor {
|
||||
const options = super.getConfigurationOverrides();
|
||||
options.readOnly = true;
|
||||
if (this.input) {
|
||||
options.inDiffEditor = InDiffEditorState.SideBySideLeft;
|
||||
options.inDiffEditor = false;
|
||||
options.scrollBeyondLastLine = false;
|
||||
options.folding = false;
|
||||
options.renderWhitespace = 'none';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
|
||||
import { getZoomLevel } from 'vs/base/browser/browser';
|
||||
import { getPixelRatio, getZoomLevel } from 'vs/base/browser/browser';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import * as types from 'vs/base/common/types';
|
||||
@@ -34,8 +34,7 @@ export class BareResultsGridInfo extends BareFontInfo {
|
||||
cellPadding?: number | number[];
|
||||
}, zoomLevel: number): BareResultsGridInfo {
|
||||
let cellPadding = !types.isUndefinedOrNull(opts.cellPadding) ? opts.cellPadding : RESULTS_GRID_DEFAULTS.cellPadding;
|
||||
|
||||
return new BareResultsGridInfo(BareFontInfo.createFromRawSettings(opts, zoomLevel), { cellPadding });
|
||||
return new BareResultsGridInfo(BareFontInfo.createFromRawSettings(opts, zoomLevel, getPixelRatio()), { cellPadding });
|
||||
}
|
||||
|
||||
readonly cellPadding: number | number[];
|
||||
|
||||
@@ -16,7 +16,7 @@ import { openNewQuery } from 'sql/workbench/contrib/query/browser/queryActions';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { ToggleViewAction } from 'vs/workbench/browser/actions/layoutActions';
|
||||
import { ToggleViewAction } from 'sql/workbench/browser/actions/layoutActions';
|
||||
|
||||
export class ToggleQueryHistoryAction extends ToggleViewAction {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IQueryHistoryService } from 'sql/workbench/services/queryHistory/common
|
||||
import { QueryHistoryNode } from 'sql/workbench/contrib/queryHistory/browser/queryHistoryNode';
|
||||
import { QueryHistoryInfo } from 'sql/workbench/services/queryHistory/common/queryHistoryInfo';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@@ -96,14 +96,11 @@ export class QueryHistoryWorkbenchContribution implements IWorkbenchContribution
|
||||
// markers view container
|
||||
const VIEW_CONTAINER: ViewContainer = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: QUERY_HISTORY_CONTAINER_ID,
|
||||
name: localize('queryHistory', "Query History"),
|
||||
title: localize('queryHistory', "Query History"),
|
||||
hideIfEmpty: true,
|
||||
order: 20,
|
||||
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [QUERY_HISTORY_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true, donotShowContainerTitleWhenMergedWithContainer: true }]),
|
||||
storageId: `${QUERY_HISTORY_CONTAINER_ID}.storage`,
|
||||
focusCommand: {
|
||||
id: ToggleQueryHistoryAction.ID
|
||||
}
|
||||
}, ViewContainerLocation.Panel);
|
||||
|
||||
Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([{
|
||||
|
||||
@@ -68,7 +68,7 @@ function registerResourceViewerContainer() {
|
||||
const resourceViewerIcon = registerCodicon('reosurce-view', Codicon.database);
|
||||
const viewContainer = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: RESOURCE_VIEWER_VIEW_CONTAINER_ID,
|
||||
name: localize('resourceViewer', "Resource Viewer"),
|
||||
title: localize('resourceViewer', "Resource Viewer"),
|
||||
ctorDescriptor: new SyncDescriptor(ResourceViewerViewlet),
|
||||
icon: resourceViewerIcon,
|
||||
alwaysUseContainerInfo: true
|
||||
|
||||
@@ -20,7 +20,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IViewPaneOptions, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
|
||||
@@ -75,14 +75,11 @@ registry.registerWorkbenchAction(
|
||||
// markers view container
|
||||
const VIEW_CONTAINER: ViewContainer = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: TASKS_CONTAINER_ID,
|
||||
name: localize('tasks', "Tasks"),
|
||||
title: localize('tasks', "Tasks"),
|
||||
hideIfEmpty: true,
|
||||
order: 20,
|
||||
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [TASKS_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true, donotShowContainerTitleWhenMergedWithContainer: true }]),
|
||||
storageId: `${TASKS_CONTAINER_ID}.storage`,
|
||||
focusCommand: {
|
||||
id: ToggleTasksAction.ID
|
||||
}
|
||||
storageId: `${TASKS_CONTAINER_ID}.storage`
|
||||
}, ViewContainerLocation.Panel);
|
||||
|
||||
Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ToggleViewAction } from 'vs/workbench/browser/actions/layoutActions';
|
||||
import { ToggleViewAction } from 'sql/workbench/browser/actions/layoutActions';
|
||||
import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { TASKS_VIEW_ID } from 'sql/workbench/contrib/tasks/common/tasks';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
||||
import { DefaultFilter, DefaultDragAndDrop, DefaultAccessibilityProvider } from 'vs/base/parts/tree/browser/treeDefaults';
|
||||
import { localize } from 'vs/nls';
|
||||
import { hide, $, append } from 'vs/base/browser/dom';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@@ -32,7 +32,8 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { IViewPaneOptions, ViewPane, ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { attachModalDialogStyler, attachPanelStyler } from 'sql/workbench/common/styler';
|
||||
import { IViewDescriptorService, IViewsRegistry, Extensions as ViewContainerExtensions, IViewContainersRegistry, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
@@ -53,7 +54,7 @@ export class AccountPaneContainer extends ViewPaneContainer {
|
||||
|
||||
export const ACCOUNT_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: localize('accountExplorer.name', "Accounts"),
|
||||
title: localize('accountExplorer.name', "Accounts"),
|
||||
ctorDescriptor: new SyncDescriptor(AccountPaneContainer),
|
||||
storageId: `${VIEWLET_ID}.state`
|
||||
}, ViewContainerLocation.Dialog);
|
||||
|
||||
@@ -70,7 +70,7 @@ suite('ConnectionDialogService tests', () => {
|
||||
setup(() => {
|
||||
const viewInstantiationService: TestInstantiationService = <TestInstantiationService>workbenchInstantiationService();
|
||||
const viewDescriptorService = viewInstantiationService.createInstance(ViewDescriptorService);
|
||||
container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer({ id: 'testContainer', name: 'test', ctorDescriptor: new SyncDescriptor(<any>{}) }, ViewContainerLocation.Sidebar);
|
||||
container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer({ id: 'testContainer', title: 'test', ctorDescriptor: new SyncDescriptor(<any>{}) }, ViewContainerLocation.Sidebar);
|
||||
viewInstantiationService.stub(IViewDescriptorService, viewDescriptorService);
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id: testTreeViewId,
|
||||
|
||||
@@ -42,7 +42,7 @@ suite('ConnectionDialogWidget tests', () => {
|
||||
setup(() => {
|
||||
const viewInstantiationService: TestInstantiationService = <TestInstantiationService>workbenchInstantiationService();
|
||||
const viewDescriptorService = viewInstantiationService.createInstance(ViewDescriptorService);
|
||||
container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer({ id: 'testContainer', name: 'test', ctorDescriptor: new SyncDescriptor(<any>{}) }, ViewContainerLocation.Sidebar);
|
||||
container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer({ id: 'testContainer', title: 'test', ctorDescriptor: new SyncDescriptor(<any>{}) }, ViewContainerLocation.Sidebar);
|
||||
viewInstantiationService.stub(IViewDescriptorService, viewDescriptorService);
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id: testTreeViewId,
|
||||
|
||||
@@ -842,7 +842,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
||||
this.addEventListener(DOM.EventType.MOUSE_MOVE, mouseMove, { passive: true });
|
||||
setTimeout(async () => {
|
||||
if (node instanceof ResolvableTreeItem) {
|
||||
await node.resolve();
|
||||
await node.resolve(undefined);
|
||||
}
|
||||
let tooltip: IMarkdownString | string | undefined = node.tooltip ?? label;
|
||||
if (isHovering && tooltip) {
|
||||
|
||||
@@ -81,7 +81,7 @@ export class ErrorMessageDialog extends Modal {
|
||||
}
|
||||
}, 'left', true);
|
||||
this._copyButton!.icon = {
|
||||
classNames: 'codicon scriptToClipboard'
|
||||
id: 'codicon scriptToClipboard'
|
||||
};
|
||||
this._copyButton!.element.title = copyButtonLabel;
|
||||
this._register(attachButtonStyler(this._copyButton!, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND, buttonForeground: SIDE_BAR_FOREGROUND }));
|
||||
|
||||
@@ -39,7 +39,8 @@ import { TaskRegistry } from 'sql/workbench/services/tasks/browser/tasksRegistry
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { ViewPane, IViewPaneOptions, ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { attachPanelStyler, attachModalDialogStyler } from 'sql/workbench/common/styler';
|
||||
import { IViewDescriptorService, IViewContainersRegistry, ViewContainerLocation, Extensions as ViewContainerExtensions, IViewsRegistry } from 'vs/workbench/common/views';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
@@ -61,7 +62,7 @@ export class InsightsDetailPaneContainer extends ViewPaneContainer { }
|
||||
|
||||
export const INSIGHTS_DETAIL_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: nls.localize('insightsDetailView.name', "Insight Details"),
|
||||
title: nls.localize('insightsDetailView.name', "Insight Details"),
|
||||
ctorDescriptor: new SyncDescriptor(InsightsDetailPaneContainer),
|
||||
storageId: `${VIEWLET_ID}.state`
|
||||
}, ViewContainerLocation.Dialog);
|
||||
|
||||
@@ -32,7 +32,7 @@ const testColumns: string[] = [
|
||||
];
|
||||
|
||||
suite('Insights Dialog Controller Tests', () => {
|
||||
test('updates correctly with good input', async (done) => {
|
||||
test('updates correctly with good input', (done) => {
|
||||
|
||||
let model = new InsightsDialogModel();
|
||||
|
||||
@@ -82,19 +82,21 @@ suite('Insights Dialog Controller Tests', () => {
|
||||
options: {}
|
||||
};
|
||||
|
||||
await controller.update(<IInsightsConfigDetails>{ query: 'query' }, profile);
|
||||
// Once we update the controller, listen on when it changes the model and verify the data it
|
||||
// puts in is correct
|
||||
model.onDataChange(() => {
|
||||
for (let i = 0; i < testData.length; i++) {
|
||||
for (let j = 0; j < testData[i].length; j++) {
|
||||
equal(testData[i][j], model.rows[i][j]);
|
||||
controller.update(<IInsightsConfigDetails>{ query: 'query' }, profile).then(() => {
|
||||
// Once we update the controller, listen on when it changes the model and verify the data it
|
||||
// puts in is correct
|
||||
model.onDataChange(() => {
|
||||
for (let i = 0; i < testData.length; i++) {
|
||||
for (let j = 0; j < testData[i].length; j++) {
|
||||
equal(testData[i][j], model.rows[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
done();
|
||||
done();
|
||||
});
|
||||
// Fake the query Runner telling the controller the query is complete
|
||||
complete();
|
||||
});
|
||||
// Fake the query Runner telling the controller the query is complete
|
||||
complete();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import * as os from 'os';
|
||||
import { resolveQueryFilePath } from 'sql/workbench/services/insights/common/insightsUtils';
|
||||
|
||||
import * as path from 'vs/base/common/path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
import { Workspace, toWorkspaceFolder, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { ConfigurationResolverService, BaseConfigurationResolverService } from 'vs/workbench/services/configurationResolver/browser/configurationResolverService';
|
||||
@@ -45,7 +46,9 @@ suite('Insights Utils tests', function () {
|
||||
// Create test file - just needs to exist for verifying the path resolution worked correctly
|
||||
testRootPath = path.join(os.tmpdir(), 'adstests');
|
||||
queryFileDir = getRandomTestPath(testRootPath, 'insightsutils');
|
||||
await pfs.mkdirp(queryFileDir);
|
||||
|
||||
await fs.promises.mkdir(queryFileDir, { recursive: true });
|
||||
|
||||
queryFilePath = path.join(queryFileDir, 'test.sql');
|
||||
await pfs.writeFile(queryFilePath, '');
|
||||
});
|
||||
|
||||
@@ -59,9 +59,7 @@ export class TaskService implements ITaskService {
|
||||
this._taskQueue = new TaskNode('Root');
|
||||
this._onTaskComplete = new Emitter<TaskNode>();
|
||||
this._onAddNewTask = new Emitter<TaskNode>();
|
||||
|
||||
lifecycleService.onBeforeShutdown(event => event.veto(this.beforeShutdown()));
|
||||
|
||||
lifecycleService.onBeforeShutdown(event => event.veto(this.beforeShutdown(), 'veto.taskservice'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user