in src/extension.ts [190:325]
await callWithTelemetryAndErrorHandling("azIntegrationAccounts.activate", async function activateCallback(this: IActionContext): Promise<void> {
this.properties.isActivationEvent = "true";
const integrationAccountProvider = new IntegrationAccountProvider();
const integrationAccountTree = new AzureTreeDataProvider(integrationAccountProvider, "azIntegrationAccounts.loadMore");
context.subscriptions.push(integrationAccountTree);
context.subscriptions.push(vscode.window.registerTreeDataProvider("azureIntegrationAccountsExplorer", integrationAccountTree));
const integrationAccountAgreementEditor = new IntegrationAccountAgreementEditor();
context.subscriptions.push(integrationAccountAgreementEditor);
const integrationAccountMapEditor = new IntegrationAccountMapEditor();
context.subscriptions.push(integrationAccountMapEditor);
const integrationAccountPartnerEditor = new IntegrationAccountPartnerEditor();
context.subscriptions.push(integrationAccountMapEditor);
const integrationAccountSchemaEditor = new IntegrationAccountSchemaEditor();
context.subscriptions.push(integrationAccountMapEditor);
registerCommand("azIntegrationAccounts.createIntegrationAccount", async (node?: IAzureParentNode) => {
await createChildNode(integrationAccountTree, Constants.SubscriptionContextValue, node);
});
registerCommand("azIntegrationAccounts.createAgreement", async (node?: IAzureParentNode) => {
const child = await createChildNode(integrationAccountTree, IntegrationAccountAgreementsTreeItem.contextValue, node);
await openIntegrationAccountAgreementInEditor(integrationAccountTree, integrationAccountAgreementEditor, child);
});
registerCommand("azIntegrationAccounts.createMap", async (node?: IAzureParentNode) => {
const child = await createChildNode(integrationAccountTree, IntegrationAccountMapsTreeItem.contextValue, node);
await openIntegrationAccountMapInEditor(integrationAccountTree, integrationAccountMapEditor, child);
});
registerCommand("azIntegrationAccounts.createPartner", async (node?: IAzureParentNode) => {
const child = await createChildNode(integrationAccountTree, IntegrationAccountPartnersTreeItem.contextValue, node);
await openIntegrationAccountPartnerInEditor(integrationAccountTree, integrationAccountPartnerEditor, child);
});
registerCommand("azIntegrationAccounts.createSchema", async (node?: IAzureParentNode) => {
const child = await createChildNode(integrationAccountTree, IntegrationAccountSchemasTreeItem.contextValue, node);
await openIntegrationAccountSchemaInEditor(integrationAccountTree, integrationAccountSchemaEditor, child);
});
registerCommand("azIntegrationAccounts.deleteIntegrationAccount", async (node: IAzureNode) => {
await deleteIntegrationAccount(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.deleteAgreement", async (node: IAzureNode) => {
await deleteIntegrationAccountAgreement(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.deleteMap", async (node: IAzureNode) => {
await deleteIntegrationAccountMap(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.deletePartner", async (node: IAzureNode) => {
await deleteIntegrationAccountPartner(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.deleteSchema", async (node: IAzureNode) => {
await deleteIntegrationAccountSchema(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.loadMore", async (node: IAzureNode) => {
await integrationAccountTree.loadMore(node);
});
registerEvent("azIntegrationAccounts.integrationAccountAgreementEditor.onDidSaveTextDocument",
vscode.workspace.onDidSaveTextDocument,
async function (this: IActionContext, document: vscode.TextDocument): Promise<void> {
await integrationAccountAgreementEditor.onDidSaveTextDocument(this, context.globalState, document);
});
registerEvent("azIntegrationAccounts.integrationAccountMapEditor.onDidSaveTextDocument",
vscode.workspace.onDidSaveTextDocument,
async function (this: IActionContext, document: vscode.TextDocument): Promise<void> {
await integrationAccountMapEditor.onDidSaveTextDocument(this, context.globalState, document);
});
registerEvent("azIntegrationAccounts.integrationAccountPartnerEditor.onDidSaveTextDocument",
vscode.workspace.onDidSaveTextDocument,
async function (this: IActionContext, document: vscode.TextDocument): Promise<void> {
await integrationAccountPartnerEditor.onDidSaveTextDocument(this, context.globalState, document);
});
registerEvent("azIntegrationAccounts.integrationAccountSchemaEditor.onDidSaveTextDocument",
vscode.workspace.onDidSaveTextDocument,
async function (this: IActionContext, document: vscode.TextDocument): Promise<void> {
await integrationAccountSchemaEditor.onDidSaveTextDocument(this, context.globalState, document);
});
registerCommand("azIntegrationAccounts.openAgreementInEditor", async (node?: IAzureNode) => {
await openIntegrationAccountAgreementInEditor(integrationAccountTree, integrationAccountAgreementEditor, node);
});
registerCommand("azIntegrationAccounts.openMapInEditor", async (node?: IAzureNode) => {
await openIntegrationAccountMapInEditor(integrationAccountTree, integrationAccountMapEditor, node);
});
registerCommand("azIntegrationAccounts.openPartnerInEditor", async (node?: IAzureNode) => {
await openIntegrationAccountPartnerInEditor(integrationAccountTree, integrationAccountPartnerEditor, node);
});
registerCommand("azIntegrationAccounts.openSchemaInEditor", async (node?: IAzureNode) => {
await openIntegrationAccountSchemaInEditor(integrationAccountTree, integrationAccountSchemaEditor, node);
});
registerCommand("azIntegrationAccounts.refresh", async (node?: IAzureNode) => {
await integrationAccountTree.refresh(node);
});
registerCommand("azIntegrationAccounts.selectSubscriptions", () => {
vscode.commands.executeCommand("azure-account.selectSubscriptions");
});
registerCommand("azIntegrationAccounts.viewAgreementProperties", async (node?: IAzureNode) => {
await viewIntegrationAccountAgreementProperties(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.viewMapProperties", async (node?: IAzureNode) => {
await viewIntegrationAccountMapProperties(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.viewPartnerProperties", async (node?: IAzureNode) => {
await viewIntegrationAccountPartnerProperties(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.viewSchemaProperties", async (node?: IAzureNode) => {
await viewIntegrationAccountSchemaProperties(integrationAccountTree, node);
});
registerCommand("azIntegrationAccounts.viewIntegrationAccountProperties", async (node?: IAzureNode) => {
await viewIntegrationAccountProperties(integrationAccountTree, node);
});
});