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

Function makePreviewerList

src/helpViewer/helpPreviewer.ts:60–79  ·  view source on GitHub ↗
(options: RHelpPreviewerOptions)

Source from the content-addressed store, hash-verified

58}
59
60export function makePreviewerList(options: RHelpPreviewerOptions): RLocalHelpPreviewer[] {
61 const subDirs = config().get<string[]>('helpPanel.previewLocalPackages', []);
62 const workspaces = vscode.workspace.workspaceFolders || [];
63 const ret: RLocalHelpPreviewer[] = [];
64 let previewCounter = 1;
65 for (const workspace of workspaces) {
66 for(const subDir of subDirs){
67 const dir = vscode.Uri.joinPath(workspace.uri, subDir);
68 const dirPath = dir.fsPath;
69 const tmpPreviewer = new RLocalHelpPreviewer(options, dirPath, previewCounter);
70 if(tmpPreviewer.isPackageDir){
71 ret.push(tmpPreviewer);
72 previewCounter = previewCounter + 1;
73 } else{
74 tmpPreviewer.dispose();
75 }
76 }
77 }
78 return ret;
79}
80
81const DUMMY_TOPIC_TITLE = '<UNNAMED TOPIC>';
82const DUMMY_TOPIC_VERSION = '?.?.?';

Callers 2

constructorMethod · 0.90
refreshMethod · 0.90

Calls 3

disposeMethod · 0.95
configFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected