Add option to open command results in a new tab#47
Closed
mburleigh wants to merge 6 commits intomicrosoft:masterfrom
Closed
Add option to open command results in a new tab#47mburleigh wants to merge 6 commits intomicrosoft:masterfrom
mburleigh wants to merge 6 commits intomicrosoft:masterfrom
Conversation
add status bar item to RunLineInEditor class add execution timing to RunLineInEditor class
Contributor
Author
|
@chrisdias @chrmarti is there anything I can do to move this PR along? |
Contributor
|
@mburleigh Sorry, we were heads-down into another part of the VS Code project. I'll take a look. |
chrmarti
reviewed
Jun 24, 2019
Contributor
chrmarti
left a comment
There was a problem hiding this comment.
Thanks for the PR! I have added a few comments.
| this.query = undefined; // TODO | ||
| const cursor = source.selection.active; | ||
| const line = source.document.lineAt(cursor).text; | ||
| const isPlainText = (line.indexOf('--query') !== -1) || (line.indexOf('-h') !== -1) || (line.indexOf('--help') !== -1); |
Contributor
There was a problem hiding this comment.
Could you do this in a separate PR? And maybe check the output if it starts and ends with {} or [] to assume it is JSON. That would handle more cases.
| function replaceContent(editor: TextEditor, content: string) { | ||
| function replaceContent(editor: TextEditor, content: string, documentLanguage: string = '') { | ||
| const document = editor.document; | ||
| if (documentLanguage) { |
Contributor
There was a problem hiding this comment.
It would be better to always update because in the case where the document is reused, it might receive JSON again after plain text.
Merged
Contributor
|
Closing this PR as you split out separate ones. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Rest Client extension (https://marketplace.visualstudio.com/items?itemName=humao.rest-client) has functionality like this and after using the Azure CLI Tools extension for a while I missed being able to have the results of multiple commands available. This will open a new results tab every time "Run Line in Editor" is executed.