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

Function createRTerm

src/rTerminal.ts:140–153  ·  view source on GitHub ↗
(preserveshow?: boolean)

Source from the content-addressed store, hash-verified

138}
139
140export async function createRTerm(preserveshow?: boolean): Promise<boolean> {
141 const termOptions = await makeTerminalOptions();
142 const termPath = termOptions.shellPath;
143 if(!termPath){
144 void vscode.window.showErrorMessage('Could not find R path. Please check r.rterm and r.rpath setting.');
145 return false;
146 } else if(!fs.existsSync(termPath)){
147 void vscode.window.showErrorMessage(`Cannot find R client at ${termPath}. Please check r.rterm setting.`);
148 return false;
149 }
150 rTerm = vscode.window.createTerminal(termOptions);
151 rTerm.show(preserveshow);
152 return true;
153}
154
155export async function restartRTerminal(): Promise<void>{
156 if (typeof rTerm !== 'undefined'){

Callers 2

restartRTerminalFunction · 0.85
chooseTerminalFunction · 0.85

Calls 2

makeTerminalOptionsFunction · 0.85
showMethod · 0.80

Tested by

no test coverage detected