mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Add scripted object name to query editor tab display (#4403)
* Add scripted object name to query editor tab display * Update src/sql/parts/query/common/queryInput.ts Co-Authored-By: shueybubbles <shueybubbles@hotmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
/**
|
||||
* Creates new untitled document for SQL query and opens in new editor tab
|
||||
*/
|
||||
public newSqlEditor(sqlContent?: string, connectionProviderName?: string, isDirty?: boolean): Promise<IConnectableInput> {
|
||||
public newSqlEditor(sqlContent?: string, connectionProviderName?: string, isDirty?: boolean, objectName?: string): Promise<IConnectableInput> {
|
||||
return new Promise<IConnectableInput>(async (resolve, reject) => {
|
||||
try {
|
||||
// Create file path and file URI
|
||||
@@ -92,7 +92,7 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
}
|
||||
|
||||
const queryResultsInput: QueryResultsInput = this._instantiationService.createInstance(QueryResultsInput, docUri.toString());
|
||||
let queryInput: QueryInput = this._instantiationService.createInstance(QueryInput, '', fileInput, queryResultsInput, connectionProviderName);
|
||||
let queryInput: QueryInput = this._instantiationService.createInstance(QueryInput, objectName, fileInput, queryResultsInput, connectionProviderName);
|
||||
|
||||
this._editorService.openEditor(queryInput, { pinned: true })
|
||||
.then((editor) => {
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface IQueryEditorService {
|
||||
_serviceBrand: any;
|
||||
|
||||
// Creates new untitled document for SQL queries and opens it in a new editor tab
|
||||
newSqlEditor(sqlContent?: string, connectionProviderName?: string, isDirty?: boolean): Promise<IConnectableInput>;
|
||||
newSqlEditor(sqlContent?: string, connectionProviderName?: string, isDirty?: boolean, objectName?:string ): Promise<IConnectableInput>;
|
||||
|
||||
// Creates a new query plan document
|
||||
newQueryPlanEditor(xmlShowPlan: string): Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user