use of com.microsoft.azure.toolkit.lib.storage.service.AzureStorageAccount in project azure-tools-for-java by Microsoft.
the class StorageExplorerContributor method getModuleNode.
@Override
public Node<?> getModuleNode() {
final AzureActionManager am = AzureActionManager.getInstance();
final IAzureMessager messager = AzureMessager.getDefaultMessager();
final AzureStorageAccount service = az(AzureStorageAccount.class);
return new Node<>(service).view(new AzureServiceLabelView<>(service, NAME, ICON)).actions(StorageActionsContributor.SERVICE_ACTIONS).addChildren(AzureStorageAccount::list, (account, storageNode) -> new Node<>(account).view(new AzureResourceLabelView<>(account)).actions(StorageActionsContributor.ACCOUNT_ACTIONS));
}
use of com.microsoft.azure.toolkit.lib.storage.service.AzureStorageAccount in project azure-tools-for-java by Microsoft.
the class IntellijStorageActionsContributor method registerHandlers.
@Override
public void registerHandlers(AzureActionManager am) {
final BiPredicate<Object, AnActionEvent> condition = (r, e) -> r instanceof AzureStorageAccount;
final BiConsumer<Object, AnActionEvent> handler = (c, e) -> CreateStorageAccountAction.createStorageAccount((e.getProject()));
am.registerHandler(ResourceCommonActionsContributor.CREATE, condition, handler);
am.<IAzureResource<?>, AnActionEvent>registerHandler(ResourceCommonActionsContributor.CONNECT, (r, e) -> r instanceof StorageAccount, (r, e) -> AzureTaskManager.getInstance().runLater(() -> {
final ConnectorDialog dialog = new ConnectorDialog(e.getProject());
dialog.setResource(new AzureServiceResource<>(((StorageAccount) r), StorageAccountResourceDefinition.INSTANCE));
dialog.show();
}));
}
Aggregations