mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Port most notebook model code over to be behind a service (#3068)
- Defines a new NotebookService in Azure Data Studio which will be used to interact with notebooks. Since notebooks can require per-file instantiation the provider is just used to create & track managers for a given URI. - Inject this into notebook.component.ts and pass required parameters that'll be used to properly initialize a manger into the method. Actual initialization not done yet. - Port over & recompile notebook model code - Define most required APIs in sqlops.proposed.d.ts. In the future, these will be used by extensions to contribute their own providers.
This commit is contained in:
@@ -172,6 +172,8 @@ import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService'
|
||||
import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IUriDisplayService, UriDisplayService } from 'vs/platform/uriDisplay/common/uriDisplay';
|
||||
import { NotebookService } from 'sql/services/notebook/notebookServiceImpl';
|
||||
import { INotebookService } from 'sql/services/notebook/notebookService';
|
||||
|
||||
interface WorkbenchParams {
|
||||
configuration: IWindowConfiguration;
|
||||
@@ -573,11 +575,14 @@ export class Workbench extends Disposable implements IPartService {
|
||||
serviceCollection.set(IInsightsDialogService, this.instantiationService.createInstance(InsightsDialogService));
|
||||
let accountManagementService = this.instantiationService.createInstance(AccountManagementService, undefined);
|
||||
serviceCollection.set(IAccountManagementService, accountManagementService);
|
||||
let notebookService = this.instantiationService.createInstance(NotebookService);
|
||||
serviceCollection.set(INotebookService, notebookService);
|
||||
serviceCollection.set(IAccountPickerService, this.instantiationService.createInstance(AccountPickerService));
|
||||
serviceCollection.set(IProfilerService, this.instantiationService.createInstance(ProfilerService));
|
||||
|
||||
this._register(toDisposable(() => connectionManagementService.shutdown()));
|
||||
this._register(toDisposable(() => accountManagementService.shutdown()));
|
||||
this._register(toDisposable(() => notebookService.shutdown()));
|
||||
this._register(toDisposable(() => capabilitiesService.shutdown()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user