mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
pass in notification service (#14499)
* pass in notification service * make the parameter required
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user