Search in sources :

Example 1 with CreateBlobContainerForm

use of com.microsoft.azuretools.azureexplorer.forms.CreateBlobContainerForm in project azure-tools-for-java by Microsoft.

the class CreateBlobContainer method actionPerformed.

@Override
public void actionPerformed(NodeActionEvent e) {
    String connectionString;
    if (parent instanceof BlobModule) {
        connectionString = StorageClientSDKManager.getConnectionString(((BlobModule) parent).getStorageAccount());
    } else {
        connectionString = StorageClientSDKManager.getConnectionString(((StorageNode) parent).getStorageAccount());
    }
    CreateBlobContainerForm form = new CreateBlobContainerForm(PluginUtil.getParentShell(), connectionString);
    if (parent instanceof StorageNode) {
        form.setSubscription(new SubscriptionDetail(((StorageNode) parent).getSubscriptionId(), null, null, true));
    }
    form.setOnCreate(new Runnable() {

        @Override
        public void run() {
            parent.removeAllChildNodes();
            parent.load(false);
        }
    });
    form.open();
}
Also used : CreateBlobContainerForm(com.microsoft.azuretools.azureexplorer.forms.CreateBlobContainerForm) SubscriptionDetail(com.microsoft.azuretools.authmanage.models.SubscriptionDetail) BlobModule(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule) StorageNode(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.StorageNode)

Aggregations

SubscriptionDetail (com.microsoft.azuretools.authmanage.models.SubscriptionDetail)1 CreateBlobContainerForm (com.microsoft.azuretools.azureexplorer.forms.CreateBlobContainerForm)1 BlobModule (com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule)1 StorageNode (com.microsoft.tooling.msservices.serviceexplorer.azure.storage.StorageNode)1