mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
add config for open after save behavior (#15675)
This commit is contained in:
@@ -396,6 +396,11 @@ const queryEditorConfiguration: IConfigurationNode = {
|
||||
'default': 5000,
|
||||
'description': localize('queryEditor.inMemoryDataProcessingThreshold', "Controls the max number of rows allowed to do filtering and sorting in memory. If the number is exceeded, sorting and filtering will be disabled. Warning: Increasing this may impact performance.")
|
||||
},
|
||||
'queryEditor.results.openAfterSave': {
|
||||
'type': 'boolean',
|
||||
'description': localize('queryEditor.results.openAfterSave', "Whether to open the file in Azure Data Studio after the result is saved."),
|
||||
'default': true
|
||||
},
|
||||
'queryEditor.messages.showBatchTime': {
|
||||
'type': 'boolean',
|
||||
'description': localize('queryEditor.messages.showBatchTime', "Should execution time be shown for individual batches"),
|
||||
|
||||
@@ -314,7 +314,8 @@ export class ResultSerializer {
|
||||
* Open the saved file in a new vscode editor pane
|
||||
*/
|
||||
private openSavedFile(filePath: URI, format: string): void {
|
||||
if (format !== SaveFormat.EXCEL) {
|
||||
const openAfterSaveConfig = this._configurationService.getValue<IQueryEditorConfiguration>('queryEditor').results.openAfterSave;
|
||||
if (format !== SaveFormat.EXCEL && openAfterSaveConfig) {
|
||||
this._editorService.openEditor({ resource: filePath }).then((result) => {
|
||||
|
||||
}, (error: any) => {
|
||||
@@ -330,7 +331,7 @@ export class ResultSerializer {
|
||||
[{
|
||||
label: nls.localize('openFile', "Open file"),
|
||||
run: () => {
|
||||
this.openerService.open(filePath, { openExternal: true });
|
||||
this.openerService.open(filePath, { openExternal: format === SaveFormat.EXCEL });
|
||||
}
|
||||
}]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user