lbownik commented on code in PR #5543:
URL: https://github.com/apache/netbeans/pull/5543#discussion_r1114618371


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/AddADBAction.java:
##########
@@ -83,47 +89,82 @@ public class AddADBAction implements ActionListener {
     private static final String USERNAME = "username"; //NOI18N
     private static final String PASSWORD = "password"; //NOI18N
 
+    @NbBundle.Messages({
+        "MSG_CollectingProfiles=Searching for OCI Profiles",
+        "MSG_CollectingProfiles_Text=Loading OCI Profiles",
+        "MSG_CollectingItems=Loading OCI contents",
+        "MSG_CollectingItems_Text=Listing compartments and databases",
+    })
     @Override
     public void actionPerformed(ActionEvent e) {
         Map<String, Object> result = new HashMap<> ();
         
         NotifyDescriptor.ComposedInput ci = new 
NotifyDescriptor.ComposedInput(Bundle.AddADB(), 3, new Callback() {
-            Map<Integer, List> values = new HashMap<> ();
-            
+            Map<Integer, Map> values = new HashMap<> ();
+
             @Override
             public NotifyDescriptor createInput(NotifyDescriptor.ComposedInput 
input, int number) {
                 if (number == 1) {
-                    List<TenancyItem> tenancies = new ArrayList<>();
-                    for (OCIProfile p : 
OCIManager.getDefault().getConnectedProfiles()) {
-                        p.getTenancy().ifPresent(tenancies::add);
+                    ProgressHandle h = 
ProgressHandle.createHandle(Bundle.MSG_CollectingProfiles());
+                    h.start();
+                    h.progress(Bundle.MSG_CollectingProfiles_Text());
+        
+                    Map<OCIProfile, Tenancy> profiles = new LinkedHashMap<>();
+                    Map<String, TenancyItem> tenancyItems = new 
LinkedHashMap<>();
+                    try {
+                        for (OCIProfile p : 
OCIManager.getDefault().getConnectedProfiles()) {
+                            TenancyItem t = p.getTenancy().orElse(null);

Review Comment:
   wouldn't Optional.ifPresent be more apropriate?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to