use of com.microsoft.azuretools.ijidea.ui.SubscriptionsDialog in project azure-tools-for-java by Microsoft.
the class SelectSubscriptionsAction method onShowSubscriptions.
public static void onShowSubscriptions(Project project) {
JFrame frame = WindowManager.getInstance().getFrame(project);
try {
//Project project = ProjectManager.getInstance().getDefaultProject();();
AzureManager manager = AuthMethodManager.getInstance().getAzureManager();
if (manager == null) {
return;
}
final SubscriptionManager subscriptionManager = manager.getSubscriptionManager();
updateSubscriptionWithProgressDialog(subscriptionManager, project);
List<SubscriptionDetail> sdl = subscriptionManager.getSubscriptionDetails();
for (SubscriptionDetail sd : sdl) {
System.out.println(sd.getSubscriptionName());
}
//System.out.println("onShowSubscriptions: calling getSubscriptionDetails()");
SubscriptionsDialog d = SubscriptionsDialog.go(subscriptionManager.getSubscriptionDetails(), project);
List<SubscriptionDetail> subscriptionDetailsUpdated;
if (d != null) {
subscriptionDetailsUpdated = d.getSubscriptionDetails();
subscriptionManager.setSubscriptionDetails(subscriptionDetailsUpdated);
}
} catch (Exception ex) {
ex.printStackTrace();
//LOGGER.error("onShowSubscriptions", ex);
ErrorWindow.show(project, ex.getMessage(), "Select Subscriptions Action Error");
}
}
Aggregations