How to use the vscode-azureextensionui.AzExtTreeDataProvider function in vscode-azureextensionui

To help you get started, we’ve selected a few vscode-azureextensionui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / vscode-azure-iot-toolkit / src / extension.ts View on Github external
function activateIoTHub(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel) {
    const iotHubTreeItem = new IoTHubAccountTreeItem();
    const iotHubExtTreeDataProvider = new AzExtTreeDataProvider(iotHubTreeItem, "azure-iot-hub.loadMore");

    const azureIoTExplorer = new AzureIoTExplorer(outputChannel, context, iotHubExtTreeDataProvider);

    // Note: Hide IoT Hub tree view from Azure viewlet
    // context.subscriptions.push(iotHubTreeItem);
    // context.subscriptions.push(vscode.window.createTreeView("iotHubExplorer", { treeDataProvider: iotHubExtTreeDataProvider, showCollapseAll: true }));

    // registerCommand("azure-iot-hub.setIoTHub", async (actionContext: IActionContext, node?: IoTHubResourceTreeItem) => {
    //     await azureIoTExplorer.setIoTHub(actionContext, node);
    // });

    // registerCommand("azure-iot-hub.loadMore", async (actionContext: IActionContext, node: AzureTreeItem) => {
    //     await azureIoTExplorer.loadMore(actionContext, node);
    // });

    // registerCommand("azure-iot-hub.refresh", async (actionContext: IActionContext, node: AzureTreeItem) => {
github microsoft / vscode-azure-iot-toolkit / src / extension.ts View on Github external
function activateDps(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel) {
    let dpsTreeItem = new DpsAccountTreeItem();
    let dpsExtTreeDataProvider = new AzExtTreeDataProvider(dpsTreeItem, "azure-iot-dps.loadMore");

    context.subscriptions.push(dpsTreeItem);
    context.subscriptions.push(vscode.window.createTreeView("iotDpsExplorer", { treeDataProvider: dpsExtTreeDataProvider, showCollapseAll: true }));

    let azureDpsExplorer = new AzureDpsExplorer(outputChannel, dpsExtTreeDataProvider);

    registerCommand("azure-iot-dps.viewProperties", async (actionContext: IActionContext, node?: DpsResourceTreeItem) => {
        await azureDpsExplorer.viewProperties(actionContext, node);
    });
    registerCommand("azure-iot-dps.loadMore", async (actionContext: IActionContext, node: AzureTreeItem) => {
        await azureDpsExplorer.loadMore(actionContext, node);
    });
    registerCommand("azure-iot-dps.refresh", async (actionContext: IActionContext, node: AzureTreeItem) => {
        await azureDpsExplorer.refresh(actionContext, node);
    });
}