JaroslavTulach commented on code in PR #9602:
URL: https://github.com/apache/netbeans/pull/9602#discussion_r3939605773
##########
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, I wanted to use `instanceof` pattern too
- I've noticed the NetBeans IDE support of `var` is pretty poor
- for example move refactoring replaces `var` with FQN types!? I hope
- I fix it one day.
- probably a result of this kind of attitude towards `var`
- I don't share such attitude
- For last for years I was coding in languages where it is enough to
write `x = 3.14`
- even `var` is too verbose for my taste
- I prefer use of `var` in my code over needless verbosity of specifying the
type at each assignment
--
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