sid-srini commented on code in PR #8827:
URL: https://github.com/apache/netbeans/pull/8827#discussion_r2371096166


##########
java/java.hints/src/org/netbeans/modules/java/hints/OrganizeImports.java:
##########
@@ -213,21 +243,38 @@ public int compare(ImportTree o1, ImportTree o2) {
                         return 0;
                     String s1 = o1.getQualifiedIdentifier().toString();
                     String s2 = o2.getQualifiedIdentifier().toString();
-                    int bal = groups.getGroupId(s1, o1.isStatic()) - 
groups.getGroupId(s2, o2.isStatic());
+                    int bal;
+                    if (o1.isModule()) bal = o2.isModule() ? 0 : 1; // Place 
element imports last
+                    else if (o2.isModule()) bal = -1;               // Place 
element imports last
+                    else bal = groups.getGroupId(s1, o1.isStatic()) - 
groups.getGroupId(s2, o2.isStatic());

Review Comment:
   Thanks. I've pushed the change.



-- 
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: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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

Reply via email to