Link Search Menu Expand Document

Lookup

Lookup Command

  • src: plugin-core/src/components/lookup/LookupControllerV2.ts
show {
    ...
    provider = new LookupProviderV2
    picker :=

    @updatePickerBehavior(provider, picker)
    quickPick.onDidTriggerButton = ...
    ...
    provider.provide(quickPick)
    ...
    quickPick.show
}

updatePickerBehavior

updatePickerBehavior(quickpick, provider) {
    buttons := 
    selectedPath := buttons
    selectedSelection := buttons

    switch selectedPath {
        case journal {
            quickpick.value := 
            provider.onUpdatePickerItem(
                ....
            )
        }
    }

    switch selectedSelection {
        case {
            ...
        }
    }

}

provide

  • file: src/components/lookup/LookupProviderV2.ts
provider picker {
    picker.onDidAccept = @onDidAccept
    picker.onDidChangeValue = @onUpdatePickerItem
}