-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add preference to autosave when 'Run Test' is selected. #468
Comments
@NikolasKomonen Do you mean to save all the changed files before running the tests? |
@jdneo yes |
Or even just the test file you push the run button from. I often find myself writing a test and then running and not getting expected results because the test file didn't save. |
From my understanding, the Java language server will auto-build the workspace when the file is changed(No matter the file is saved or not). Do you guys stably meet this problem, or it just happens sometimes? |
Sorry, what I wanted was basically what @baker-travis was asking for. And if
is the case, I guess just saving the test files will do. |
@NikolasKomonen After trying, it's just the same as what you said. The Language Server will only update the class file after the saving action. So here is the basic idea coming up in my mind to solve this issue: The experience could be similar to that in Eclipse: When the user click run/debug test cases, we do the following things:
@NikolasKomonen @baker-travis Please let me know if this looks good to you. |
@jdneo I approve of this. 😀It will make life much better! |
@jdneo Sounds great, I'm looking forward to it! |
Update: To implement this feature, we need VS Code to provide the API to get all the opened editors. So far it seems that there is no such API to achieve this. See: microsoft/vscode#15178 |
Hi @ALL, Sorry for the late reply. Instead of get all opened files in VS Code. I simplified the solution to solve this issue:
More details can be found in #785.
|
Awesome, thanks! |
When I run a test would it be possible to have a preference to autosave the project?
Thanks
The text was updated successfully, but these errors were encountered: