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

Method provideTasks

src/tasks.ts:135–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 public type = TYPE;
134
135 public async provideTasks(): Promise<vscode.Task[]> {
136 const folders = vscode.workspace.workspaceFolders;
137
138 if (!folders) {
139 return [];
140 }
141
142 const tasks: vscode.Task[] = [];
143 const rPath = await getRpath(false);
144 if (!rPath) {
145 return [];
146 }
147
148 for (const folder of folders) {
149 const isRPackage = fs.existsSync(path.join(folder.uri.fsPath, 'DESCRIPTION'));
150 if (isRPackage) {
151 for (const rtask of rtasks) {
152 const task = asRTask(rPath, folder, rtask);
153 tasks.push(task);
154 }
155 }
156 }
157 return tasks;
158 }
159
160 public async resolveTask(task: vscode.Task): Promise<vscode.Task> {
161 const taskInfo: RTaskInfo = {

Callers

nothing calls this directly

Calls 2

getRpathFunction · 0.90
asRTaskFunction · 0.85

Tested by

no test coverage detected