in apps/vs-code-designer/src/app/tree/LogicAppResourceTree.ts [308:350]
public async pickTreeItemImpl(expectedContextValues: (string | RegExp)[]): Promise<AzExtTreeItem | undefined> {
if (!this.site.isSlot) {
for (const expectedContextValue of expectedContextValues) {
switch (expectedContextValue) {
case SlotsTreeItem.contextValue:
case LogicAppResourceTree.slotContextValue:
return this._slotsTreeItem;
default:
}
}
}
for (const expectedContextValue of expectedContextValues) {
if (expectedContextValue instanceof RegExp) {
const appSettingsContextValues = [ConfigurationsTreeItem.contextValue];
if (matchContextValue(expectedContextValue, appSettingsContextValues)) {
return this.configurationsTreeItem;
}
const deploymentsContextValues = [
DeploymentsTreeItem.contextValueConnected,
DeploymentsTreeItem.contextValueUnconnected,
DeploymentTreeItem.contextValue,
];
if (matchContextValue(expectedContextValue, deploymentsContextValues)) {
return this.deploymentsNode;
}
if (matchContextValue(expectedContextValue, [LogicAppResourceTree.slotContextValue])) {
return this._slotsTreeItem;
}
}
if (isString(expectedContextValue)) {
// DeploymentTreeItem.contextValue is a RegExp, but the passed in contextValue can be a string so check for a match
if (DeploymentTreeItem.contextValue.test(expectedContextValue)) {
return this.deploymentsNode;
}
} else if (matchesAnyPart(expectedContextValue, ProjectResource.Workflows, ProjectResource.Workflow)) {
return this._workflowsTreeItem;
}
}
return undefined;
}