Add limit on the file size that can be opened with Open XEL feature (#23841)

* Add limit on the file size that can be opened with Open XEL feature

* Add limit on the file size that can be opened and post a notification for large files

* Update wording

* Use FileService interface instead of fs to fix layering rules
This commit is contained in:
Sakshi Sharma
2023-07-13 20:32:55 -07:00
committed by GitHub
parent 9c43a373f8
commit 7bc05e507d
3 changed files with 23 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ import { IConnectionDialogService } from 'sql/workbench/services/connection/comm
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IFileService } from 'vs/platform/files/common/files';
CommandsRegistry.registerCommand({
id: 'profiler.newProfiler',
@@ -107,9 +108,10 @@ CommandsRegistry.registerCommand({
const editorService: IEditorService = accessor.get(IEditorService);
const fileDialogService: IFileDialogService = accessor.get(IFileDialogService);
const profilerService: IProfilerService = accessor.get(IProfilerService);
const instantiationService: IInstantiationService = accessor.get(IInstantiationService)
const instantiationService: IInstantiationService = accessor.get(IInstantiationService);
const fileService: IFileService = accessor.get(IFileService);
const result = await profilerService.openFile(fileDialogService, editorService, instantiationService);
const result = await profilerService.openFile(fileDialogService, editorService, instantiationService, fileService);
return result;
}