neilcsmith-net commented on code in PR #9602:
URL: https://github.com/apache/netbeans/pull/9602#discussion_r3940160808
##########
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:
> and we decided we rather keep it simple
Decided?? I think both approaches have pros and cons right now. This
simpler approach might be the better one, and the least intrusive, but having
the view not end up reflecting the underlying model might end up causing issues
down the line.
--
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