mbien commented on PR #9627: URL: https://github.com/apache/netbeans/pull/9627#issuecomment-5762914462
tested: ```ini # no indentation (use quotes otherwise it is null) nb.project.indentation="" # friendship mode worked too nb.project.indentation="♥ " ``` while testing I was wondering if we should split it into three properties: prefix, repeat and postfix? e.g a user could customize it like: <img width="693" height="202" alt="image" src="https://github.com/user-attachments/assets/c56c6bac-f60d-48eb-ab5b-eb7db9f7f8b1" /> added bonus is that even without using a prefix, this can produce very compact indentation since there is no need to add whitespace to the arrow. The whitespace can be in the postfix. code ( + formatted using 4 spaces): <details> ```java static String indentationPrefix(boolean html, int depth) { String prefix = UIManager.getString("nb.project.indentation.prefix"); // NOI18N if (prefix == null) { prefix = ""; } String repeat = UIManager.getString("nb.project.indentation.repeat"); // NOI18N if (repeat == null) { repeat = " "; } String postfix = UIManager.getString("nb.project.indentation.postfix"); // NOI18N if (postfix == null) { postfix = "\u00bb"; } if (depth <= 0 || (prefix.isEmpty() && repeat.isEmpty() && postfix.isEmpty())) { return ""; } if (html) { try { String xml = XMLUtil.toElementContent(prefix + repeat.repeat(depth) + postfix); return "<font color='!controlShadow'>" + xml + "</font>"; } catch (CharConversionException ex) { throw new IllegalStateException(ex); } } else { return prefix + repeat.repeat(depth) + postfix; } } ``` </details> just an idea - is this too much flexibility? -- 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
