Ericsson / CodecheckerVSCodePlugin

VSCode plugin that shows bugs detected by the Clang Static Analyzer and Clang Tidy analyzers using CodeChecker as a backend.
Apache License 2.0
24 stars 7 forks source link

Toggling “CodeChecker: Show full command line show” results in toggling of output terminal (switching between codechecker’s and the first one on the list of terminals), #78

Closed dkrupp closed 2 years ago

dkrupp commented 2 years ago

Toggling “CodeChecker: Show full command line show” results in toggling of output terminal (switching between codechecker’s and the first one on the list of terminals), expected behavior is to put Codechecker output terminal “on top”. The same happens when clicking on the bottom but on “CodeChecker: analysis finished”, behavior is the same

this was reproducible with (Theia 1.21.0)

maybe this is a theia specific issue.

csordasmarton commented 2 years ago

This problem can be reproduced only when using Theia editor the same way as you described.

Looking at the source code the problem comes from this part: https://github.com/Ericsson/CodecheckerVSCodePlugin/blob/e4eb7bf2476b1fa1901d5c04ed355830e48a34b5/src/editor/logger.ts#L19-L22 @Discookie Why do we need to call the this.window.hide() function here? Without that line it work properly.

Discookie commented 2 years ago

Originally it's there, because hiding and re-showing the window resets the auto-scroll state. The user toggling it would want to see the newest logs, and not where they last stopped scrolling with autoscroll off. I believe it can be safely removed if it's buggy with Theia though.

But overall I'm not a fan of showing the full command line on the output logs tab, especially if the terminal doesn't auto-scroll to the bottom. It would be better to create a separate read-only Terminal or similar to show it.