You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sid-srini (via GitHub)" <gi...@apache.org> on 2025/09/23 04:27:17 UTC
Re: [PR] Partial handling of module imports - Organize and Add imports [netbeans]
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-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists