for diff editors, resolve the modified editor to allow run tests in c…#206026
Merged
connor4312 merged 9 commits intomicrosoft:mainfrom Feb 26, 2024
Merged
for diff editors, resolve the modified editor to allow run tests in c…#206026connor4312 merged 9 commits intomicrosoft:mainfrom
connor4312 merged 9 commits intomicrosoft:mainfrom
Conversation
…urrent file or run test at cursor to work
connor4312
reviewed
Feb 22, 2024
| return; | ||
| } | ||
|
|
||
| if (isDiffEditor(activeControl)) { |
Member
There was a problem hiding this comment.
This PR assumes that the modified editor in the diff editor is always the one where tests are present, but this may not be the case.
I think we may want to useICodeEditorService.getActiveCodeEditor() instead. The thing to check for there is whether the editor is embedded, via if (editor instanceof EmbeddedCodeEditorWidget) { editor = editor.getParentEditor() }
Contributor
Author
There was a problem hiding this comment.
Done. Removed checks for isCodeEditor given the change now uses activeCodeEditor.
Member
|
Lgtm however there is a compilation error |
connor4312
approved these changes
Feb 26, 2024
aeschli
approved these changes
Feb 26, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…urrent file or run test at cursor to work
Resolves #205998
When having a test file with detected tests in a diff view, the File shows test icons, but running
Run tests in current fileorRun tests at cursorfrom the command palette or shortcut, both commands fail silently. Instead resolve the underlying modified editor to run the appropriate test.