Table Designer - Save Changes feature and Editor related features (#17335)

* table designer add/remove row support

* save changes and editor support

* address comments

* fix build error

* including missing change

* lower case request name
This commit is contained in:
Alan Ren
2021-10-11 15:09:25 -07:00
committed by GitHub
parent e5f50499ce
commit ce4459a7b2
23 changed files with 495 additions and 90 deletions

View File

@@ -8,10 +8,12 @@ import { invalidProvider } from 'sql/base/common/errors';
import * as azdata from 'azdata';
import { ACTIVE_GROUP, IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { TableDesignerInput } from 'sql/workbench/browser/editor/tableDesigner/tableDesignerInput';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
export class TableDesignerService implements ITableDesignerService {
constructor(@IEditorService private _editorService: IEditorService) { }
constructor(@IEditorService private _editorService: IEditorService,
@IInstantiationService private _instantiationService: IInstantiationService) { }
public _serviceBrand: undefined;
private _providers = new Map<string, TableDesignerProvider>();
@@ -40,7 +42,7 @@ export class TableDesignerService implements ITableDesignerService {
public async openTableDesigner(providerId: string, tableInfo: azdata.designers.TableInfo): Promise<void> {
const provider = this.getProvider(providerId);
const tableDesignerInput = new TableDesignerInput(provider, tableInfo);
const tableDesignerInput = this._instantiationService.createInstance(TableDesignerInput, provider, tableInfo);
await this._editorService.openEditor(tableDesignerInput, { pinned: true }, ACTIVE_GROUP);
}
}