Angular Individual Service Injection - Decouple bootstrap service (#1457)

* change services to be individually injected into angular

* messing around with injection

* change angular bootstrapping to factory style

* formatting

* formatting

* fix imports

* fix build errors

* fix testsw

* fix tests

* fix compile errors
This commit is contained in:
Anthony Dresser
2018-05-23 16:51:02 -07:00
committed by GitHub
parent cd0f9b71c5
commit 1359354387
68 changed files with 1011 additions and 1116 deletions

View File

@@ -12,9 +12,10 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { Dimension } from 'vs/workbench/services/part/common/partService';
import { EditorOptions } from 'vs/workbench/common/editor';
import * as DOM from 'vs/base/browser/dom';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ModelViewInput } from 'sql/parts/modelComponents/modelEditor/modelViewInput';
import { IBootstrapService } from 'sql/services/bootstrap/bootstrapService';
import { bootstrapAngular } from 'sql/services/bootstrap/bootstrapService';
import { Dialog } from 'sql/platform/dialog/dialogTypes';
import { DialogPane } from 'sql/platform/dialog/dialogPane';
@@ -26,7 +27,7 @@ export class ModelViewEditor extends BaseEditor {
constructor(
@ITelemetryService telemetryService: ITelemetryService,
@IThemeService themeService: IThemeService,
@IBootstrapService private _bootstrapService: IBootstrapService
@IInstantiationService private _instantiationService: IInstantiationService
) {
super(ModelViewEditor.ID, telemetryService, themeService);
}
@@ -52,7 +53,7 @@ export class ModelViewEditor extends BaseEditor {
if (!this._modelViewMap.get(input.modelViewId)) {
let modelViewContainer = DOM.$('div.model-view-container');
let dialogPane = new DialogPane(input.title, input.modelViewId, () => undefined, this._bootstrapService);
let dialogPane = new DialogPane(input.title, input.modelViewId, () => undefined, this._instantiationService);
dialogPane.createBody(modelViewContainer);
this._modelViewMap.set(input.modelViewId, modelViewContainer);
}