MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / toggle

Method toggle

src/liveShare/shareTree.ts:101–110  ·  view source on GitHub ↗
(treeProvider: LiveShareTreeProvider)

Source from the content-addressed store, hash-verified

99/// Nodes for changing R LiveShare variables
100class ShareNode extends ToggleNode {
101 toggle(treeProvider: LiveShareTreeProvider): void {
102 shareWorkspace = !shareWorkspace;
103 this.description = shareWorkspace === true ? 'Enabled' : 'Disabled';
104 if (shareWorkspace) {
105 void rHostService?.notifyRequest(requestFile, true);
106 } else {
107 void rHostService?.orderGuestDetach();
108 }
109 treeProvider.refresh();
110 }
111
112 public label: string = 'Share R Workspace';
113 public tooltip: string = 'Whether guests can access the current R session and its workspace';

Callers

nothing calls this directly

Calls 3

notifyRequestMethod · 0.80
orderGuestDetachMethod · 0.80
refreshMethod · 0.65

Tested by

no test coverage detected