import { ThemeIcon , WorkspaceFolder } from 'vscode' ; import { AzExtParentTreeItem , AzExtTreeItem , GenericTreeItem } from 'vscode-azureextensionui' ; import { localize } from '../../localize' ; import { isLocalProjectCV } from '../projectContextValues' ; import { LocalProjectTreeItemBase } from './LocalProjectTreeItemBase' ; export class InitLocalProjectTreeItem extends LocalProjectTreeItemBase { public contextValue : string = 'initAzFuncLocalProject' ; private readonly _projectPath : string ; public constructor ( parent , projectPath , folder ) { super ( parent , projectPath , folder ) ; this . _projectPath = projectPath ; } public hasMoreChildrenImpl ( ) { return false ; } public async loadMoreChildrenImpl ( _clearCache ) { const ti = new GenericTreeItem ( this , { contextValue : 'initProject' , label : localize ( 'initProject' , 'Initialize Project for Use with VS Code...' ) , commandId : 'azureFunctions.initProjectForVSCode' , iconPath : new ThemeIcon ( 'warning' ) } ) ; ti . commandArgs = [ this . _projectPath ] ; return [ ti ] ; } public isAncestorOfImpl ( contextValue ) { return isLocalProjectCV ( contextValue ) ; } }