mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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 { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
|
||||||
import { convertSizeToNumber } from 'sql/base/browser/dom';
|
import { convertSizeToNumber } from 'sql/base/browser/dom';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
|
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||||
|
|
||||||
class Root implements ITreeComponentItem {
|
class Root implements ITreeComponentItem {
|
||||||
label = {
|
label = {
|
||||||
@@ -59,7 +60,8 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
|||||||
@Inject(IThemeService) private themeService: IThemeService,
|
@Inject(IThemeService) private themeService: IThemeService,
|
||||||
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
|
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
|
||||||
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
||||||
@Inject(ILogService) logService: ILogService
|
@Inject(ILogService) logService: ILogService,
|
||||||
|
@Inject(INotificationService) private _notificationService: INotificationService
|
||||||
) {
|
) {
|
||||||
super(changeRef, el, logService);
|
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 {
|
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();
|
this.createTreeControl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
|
|||||||
export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implements IModelViewTreeViewDataProvider {
|
export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implements IModelViewTreeViewDataProvider {
|
||||||
constructor(handle: number, treeViewId: string,
|
constructor(handle: number, treeViewId: string,
|
||||||
context: IExtHostContext,
|
context: IExtHostContext,
|
||||||
notificationService?: INotificationService
|
notificationService: INotificationService
|
||||||
) {
|
) {
|
||||||
super(`${handle}-${treeViewId}`, context.getProxy(SqlExtHostContext.ExtHostModelViewTreeViews), notificationService);
|
super(`${handle}-${treeViewId}`, context.getProxy(SqlExtHostContext.ExtHostModelViewTreeViews), notificationService);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user