(options: RHelpPreviewerOptions)
| 58 | } |
| 59 | |
| 60 | export 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 | |
| 81 | const DUMMY_TOPIC_TITLE = '<UNNAMED TOPIC>'; |
| 82 | const DUMMY_TOPIC_VERSION = '?.?.?'; |
no test coverage detected