jtulach commented on code in PR #9602:
URL: https://github.com/apache/netbeans/pull/9602#discussion_r3947324467


##########
ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java:
##########
@@ -1965,6 +1969,21 @@ public int compare(Project p1, Project p2) {
         }
         
     }
+    private static class ProjectByPathComparator implements 
Comparator<Project> {
+        @Override
+        public int compare(Project p1, Project p2) {
+            if (p1 == null && p2 == null) {
+                return 0;
+            }
+            if (p1 == null) {
+                return -1;
+            }
+            if (p2 == null) {
+                return 1;
+            }
+            return 
p1.getProjectDirectory().getPath().compareTo(p2.getProjectDirectory().getPath());

Review Comment:
   > I think both approaches have pros and cons right now. This simpler 
approach might be the better one, and the least intrusive
   
   - Right. The approach in this PR is less intrusive than the one proposed in 
#9592
      - there are _known unknowns_ of the `WithNestedProjects` solution
      - and certainly there are some _unknown unknowns_ awaiting behind the 
corrner
   - The amount of (both) _unknowns_ is way smaller in this PR approach
   - hence when [Michael 
suggested](https://github.com/apache/netbeans/pull/9592#issuecomment-5522178702)
 and I implemented his idea and spiced it with indentation ...
   
   > Decided??
   
   - ... we (me and Michael) decided it is the better approach
   - I plan to close #9592 as not needed for now
   - and deliver the long awaited solution for project nesting in this PR



-- 
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