Skip to content

Commit 0de257d

Browse files
committed
Merge branch 'develop' into feature/6401_uupload_all_oak_files
2 parents fe113d0 + 360885c commit 0de257d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/commands/SelectReport.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import vscode from 'vscode'
2+
13
import BaseCommand from './BaseCommand'
24

35
import { Container } from '../container'
@@ -10,7 +12,7 @@ export enum CommandIdentifiers {
1012

1113
export default class SelectReport extends BaseCommand {
1214
container: Container
13-
15+
1416
constructor(container: Container) {
1517
super()
1618
this.container = container
@@ -34,7 +36,12 @@ export default class SelectReport extends BaseCommand {
3436
}
3537
})
3638
}
37-
const quickPick = new QuickPick(quickPickOptions)
39+
const placeholder = `Select Project Report (${quickPickOptions.size} Report${quickPickOptions.size > 1 ? 's' : ''} Available)`
40+
const quickPick = new QuickPick(quickPickOptions, placeholder)
41+
if (quickPickOptions.size === 0) {
42+
vscode.window.showInformationMessage('Oaklean: No Project Reports Available')
43+
return
44+
}
3845
quickPick.show()
3946
}
4047
}

src/components/QuickPick.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class QuickPick {
88
vsCodeComponent: vscode.QuickPick<vscode.QuickPickItem>
99
optionsWithCallBacks: QuickPickOptions
1010

11-
constructor(options: QuickPickOptions) {
11+
constructor(options: QuickPickOptions, placeholder?: string) {
1212
this.optionsWithCallBacks = options
1313

1414
const quickPick = vscode.window.createQuickPick()
@@ -19,6 +19,7 @@ export default class QuickPick {
1919
})
2020
}
2121
quickPick.items = labels
22+
quickPick.placeholder = placeholder
2223
quickPick.onDidChangeSelection(selection => {
2324
if (selection[0] && this.optionsWithCallBacks.has(selection[0].label)) {
2425
this.optionsWithCallBacks.get(selection[0].label)?.selectionCallback()

0 commit comments

Comments
 (0)