constructor()

in src/cdpTarget.ts [17:40]


    constructor(targetJson: IRemoteTargetJson, propertyName: string, extensionPath?: string, iconPath?: string) {
        super(propertyName || targetJson.title || 'Target',
              (propertyName ? vscode.TreeItemCollapsibleState.None : vscode.TreeItemCollapsibleState.Collapsed));
        this.targetJson = targetJson;
        this.propertyName = propertyName;
        this.extensionPath = extensionPath;
        this.contextValue = (this.propertyName ? 'cdpTargetProperty' : 'cdpTarget');

        // Get the icon for this type of target
        if (this.extensionPath) {
            if (iconPath) {
                this.iconPath = {
                    dark: iconPath,
                    light: iconPath,
                };
            } else {
                const icon = `${this.targetJson.type}.svg`;
                this.iconPath = {
                    dark: path.join(this.extensionPath, 'resources', 'dark', icon),
                    light: path.join(this.extensionPath, 'resources', 'light', icon),
                };
            }
        }
    }