-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix up extension API #2053
Fix up extension API #2053
Conversation
Tested that last commit with a temporary multi-root workspace:
|
7e13faa
to
056a4d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of changes so we don't introduce binary breaking changes, other than that LGTM
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.
Since `Path` now refers to initial working directory.
public void NewFile() => editorOperations.NewFileAsync().Wait(); | ||
/// <param name="content">The content to place in the new file.</param> | ||
public void NewFile(string content) => editorOperations.NewFileAsync(content).Wait(); | ||
public void NewFile(string content = "") => editorOperations.NewFileAsync(content).Wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void NewFile(string content = "") => editorOperations.NewFileAsync(content).Wait(); |
think the previous suggestion bugged out (or I did it wrong)
0849ad9
to
0d30182
Compare
@@ -123,15 +121,15 @@ public async Task SetSelectionAsync(BufferRange selectionRange) | |||
clientContext.CurrentFileLanguage); | |||
} | |||
|
|||
public async Task NewFileAsync() | |||
public async Task NewFileAsync(string content = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async Task NewFileAsync(string content = "") | |
public async Task NewFileAsync() => NewFileAsync(string.Empty); | |
public async Task NewFileAsync(string content) |
0d30182
to
6805767
Compare
So as to now add a binary breaking change. Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
6805767
to
f6245f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ❤️
Receive a
EditorOperationResponse
(not yet otherwise used). Delete dead code. Add optionalcontent
parameter toNewFile
. ExposeCloseFile
andSaveFile
. Fix an outdated warning message.Part of PowerShell/vscode-powershell#4703 so I could test it.