pass in notification service (#14499)

* pass in notification service

* make the parameter required
This commit is contained in:
Alan Ren
2021-03-02 13:39:31 -08:00
committed by GitHub
parent 3c38e0cc8b
commit 18bdb0f37d
2 changed files with 5 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { convertSizeToNumber } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
import { INotificationService } from 'vs/platform/notification/common/notification';
class Root implements ITreeComponentItem {
label = {
@@ -59,7 +60,8 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
@Inject(IThemeService) private themeService: IThemeService,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
@Inject(ILogService) logService: ILogService,
@Inject(INotificationService) private _notificationService: INotificationService
) {
super(changeRef, el, logService);
}
@@ -76,7 +78,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
}
public setDataProvider(handle: number, componentId: string, context: any): any {
this._dataProvider = new TreeViewDataProvider(handle, componentId, context);
this._dataProvider = new TreeViewDataProvider(handle, componentId, context, this._notificationService);
this.createTreeControl();
}

View File

@@ -33,7 +33,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implements IModelViewTreeViewDataProvider {
constructor(handle: number, treeViewId: string,
context: IExtHostContext,
notificationService?: INotificationService
notificationService: INotificationService
) {
super(`${handle}-${treeViewId}`, context.getProxy(SqlExtHostContext.ExtHostModelViewTreeViews), notificationService);
}