neilcsmith-net commented on code in PR #9602:
URL: https://github.com/apache/netbeans/pull/9602#discussion_r3940145728


##########
ide/projectui/src/org/netbeans/modules/project/ui/ProjectTab.java:
##########
@@ -417,6 +421,34 @@ public void writeExternal (ObjectOutput out) throws 
IOException {
         }
     }
 
+    private static class DepthRespectingRenderer extends NodeRenderer {
+        DepthRespectingRenderer() {
+        }
+
+        @Override
+        protected int findIndent(Object model, TreeNode vis) {
+            var node = Visualizer.findNode(vis);
+            while (node != null) {
+                if (node instanceof ProjectsRootNode.BadgingNode) {
+                    var badge = (ProjectsRootNode.BadgingNode) node;
+                    return badge.pair.depth;

Review Comment:
   Yes, we've had lots of fixes for `var`, and another one just one my radar to 
look at.  We did talk about blocking use of `var` at one point in style 
guidelines for the IDE code, but I think we ended up with a general feeling of 
making sure it's legible.  Personally I think that's a judgement call based on 
making sure type information is easily understandable from reading text in the 
vicinity without requiring IDE annotations - eg. assignments with `new` may be 
OK whereas assignments from method calls may not.



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