MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / handleCommand

Function handleCommand

src/helpViewer/treeView.ts:182–196  ·  view source on GitHub ↗
(cmd: cmdName)

Source from the content-addressed store, hash-verified

180 // Called when a node or command-button on a node is clicked
181 // Only internal commands are handled here, custom commands are implemented in _handleCommand!
182 public handleCommand(cmd: cmdName){
183 if(cmd === 'CALLBACK' && this.callBack){
184 void this.callBack();
185 } else if(cmd === 'QUICKPICK'){
186 if(this.quickPickCommand){
187 this._handleCommand(this.quickPickCommand);
188 } else if(this.collapsibleState !== CollapsibleState.None){
189 void this.showQuickPick();
190 } else{
191 this.handleCommand('CALLBACK');
192 }
193 } else {
194 this._handleCommand(cmd);
195 }
196 }
197
198 // overwrite this in derived classes to handle custom commands
199 protected _handleCommand(cmd: cmdName): void;

Callers

nothing calls this directly

Calls 3

handleCommandMethod · 0.80
callBackMethod · 0.45
_handleCommandMethod · 0.45

Tested by

no test coverage detected