PowerShell / PowerShellEditorServices

A common platform for PowerShell development support in any editor or application!
MIT License
616 stars 209 forks source link

Fix up extension API #2053

Closed andyleejordan closed 10 months ago

andyleejordan commented 11 months ago

Receive a EditorOperationResponse (not yet otherwise used). Delete dead code. Add optional content parameter to NewFile. Expose CloseFile and SaveFile. Fix an outdated warning message.

Part of https://github.com/PowerShell/vscode-powershell/pull/4703 so I could test it.

andyleejordan commented 11 months ago

Tested that last commit with a temporary multi-root workspace:

> $pseditor.GetEditorContext().CurrentFile.WorkspacePath
mocks/BinaryModule/BinaryModuleTest.ps1
@andyjordane318 ...src/vscode-powershell/test/mocks andyleejordan/fix-newfile-casing ≡ +0 ~1 -0 !
> $pseditor.GetEditorContext().CurrentFile.WorkspacePath
features/CustomViews.test.ts
@andyjordane318 ...src/vscode-powershell/test/mocks andyleejordan/fix-newfile-casing ≡ +0 ~1 -0 !
> $pseditor.GetEditorContext().CurrentFile.WorkspacePath
untitled:Untitled-1