mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
fix notebookinput matches function to work with replacement (#8585)
This commit is contained in:
@@ -14,7 +14,6 @@ import { EncodingMode } from 'vs/workbench/common/editor';
|
||||
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
|
||||
import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
type PublicPart<T> = { [K in keyof T]: T[K] };
|
||||
|
||||
@@ -82,14 +81,6 @@ export class FileQueryEditorInput extends QueryEditorInput implements PublicPart
|
||||
this.text.setForceOpenAsBinary();
|
||||
}
|
||||
|
||||
save(groupId: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.save(groupId, options);
|
||||
}
|
||||
|
||||
saveAs(group: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.saveAs(group, options);
|
||||
}
|
||||
|
||||
public isResolved(): boolean {
|
||||
return this.text.isResolved();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
|
||||
import { ISelectionData, ExecutionPlanOptions } from 'azdata';
|
||||
import { startsWith } from 'vs/base/common/strings';
|
||||
import { ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
const MAX_SIZE = 13;
|
||||
|
||||
@@ -219,6 +220,14 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
}
|
||||
}
|
||||
|
||||
save(groupId: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.save(groupId, options);
|
||||
}
|
||||
|
||||
saveAs(group: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.saveAs(group, options);
|
||||
}
|
||||
|
||||
// Called to get the tooltip of the tab
|
||||
public getTitle(): string {
|
||||
return this.getName(true);
|
||||
|
||||
@@ -14,7 +14,6 @@ import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverServ
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/common/editor/untitledTextEditorInput';
|
||||
import { UntitledTextEditorModel } from 'vs/workbench/common/editor/untitledTextEditorModel';
|
||||
import { ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
type PublicPart<T> = { [K in keyof T]: T[K] };
|
||||
|
||||
@@ -73,14 +72,6 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IEncod
|
||||
this.text.setEncoding(encoding, mode);
|
||||
}
|
||||
|
||||
save(groupId: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.save(groupId, options);
|
||||
}
|
||||
|
||||
saveAs(group: number, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
return this.text.saveAs(group, options);
|
||||
}
|
||||
|
||||
isUntitled(): boolean {
|
||||
// Subclasses need to explicitly opt-in to being untitled.
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user