Conditionally show view#487
Merged
renkun-ken merged 2 commits intoREditorSupport:masterfrom Dec 9, 2020
ElianHugh:master
Merged
Conditionally show view#487renkun-ken merged 2 commits intoREditorSupport:masterfrom ElianHugh:master
renkun-ken merged 2 commits intoREditorSupport:masterfrom
ElianHugh:master
Conversation
Only show workspace view when session watcher is enabled
renkun-ken
reviewed
Dec 8, 2020
|
|
||
| // creates a custom context value for the workspace view | ||
| // only shows view when session watcher is enabled | ||
| const sessionBool = workspace.getConfiguration('r')['sessionWatcher']; |
Member
There was a problem hiding this comment.
I think this could be moved down to https://github.com/Ikuyadeu/vscode-R/blob/master/src/extension.ts#L305 where the session watcher setting is already checked.
Also, we use e.g. config().get<boolean>('sessionWatcher') instead of workspace.getConfiguration.
Collaborator
Author
There was a problem hiding this comment.
Fix inc! Is there much of a difference between config() and workspace.getConfig? I hadn't seen that command in my googling
Ikuyadeu
reviewed
Dec 9, 2020
Refactor code in line with suggestions
Ikuyadeu
approved these changes
Dec 9, 2020
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.
Only show workspace view when session watcher is enabled
What problem did you solve?
Workspace viewer only functions when session watcher is enabled. Currently, the workspace viewer is displayed even when non-functional because the session watcher is not enabled.
How can I check this pull request?
If session watcher is enabled, the workspace viewer should be visible. When session watcher is disabled, workspace viewer should not be shown.