mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
add disposeTableDesigner (#17394)
This commit is contained in:
@@ -12,6 +12,7 @@ import * as azdata from 'azdata';
|
||||
import { GroupIdentifier, IEditorInput, IRevertOptions, ISaveOptions } from 'vs/workbench/common/editor';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
const NewTable: string = localize('tableDesigner.newTable', "New Table");
|
||||
|
||||
@@ -78,12 +79,13 @@ export class TableDesignerInput extends EditorInput {
|
||||
}
|
||||
|
||||
override matches(otherInput: any): boolean {
|
||||
// For existing tables, the table designer provider will give us unique id, we can use it to do the match.
|
||||
// For new tables, we can do the match using their names.
|
||||
return otherInput instanceof TableDesignerInput
|
||||
&& this._provider.providerId === otherInput._provider.providerId
|
||||
&& this._tableInfo.isNewTable === otherInput._tableInfo.isNewTable
|
||||
&& (!this._tableInfo.isNewTable || this.getName() === otherInput.getName())
|
||||
&& (this._tableInfo.isNewTable || this._tableInfo.id === otherInput._tableInfo.id);
|
||||
&& this._tableInfo.id === otherInput._tableInfo.id;
|
||||
}
|
||||
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
this._provider.disposeTableDesigner(this._tableInfo).then(undefined, err => onUnexpectedError(err));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user