s4gh commented on PR #7925: URL: https://github.com/apache/netbeans/pull/7925#issuecomment-2453225025
@mbien and @Chris2011 1. Email is fixed in PR 2. the collapse-all action already exists and should be called instead of rolling a new implementation if possible. Yes, if you mean this https://github.com/apache/netbeans/blob/45696ba6af2d663818daf33c49c3b2710e8d35e1/ide/projectui/src/org/netbeans/modules/project/ui/ProjectTab.java#L873 I am actually using it. I mean this action had a method inside ```private void collapseNodes(Node node, ProjectTab tab)``` and I am actually calling same method from the icon. So they actually call the same method. The only difference is that when you click on icon instead of dispatching an action via framework it is simply a method call because all needed code is already in the same file. It sounds reasonable for me. Anyway there is no code duplication for in this case. 4. In the updated PR I've added code to show these icons only when mouse is in "Projects" or "Files" tab as was suggested by @Chris2011 After you remove mouse - icons are hidden. 5. As for the way to to how display such icons there are 3 options. All of them are used one of the popular IDEs. Please check screenshots below. The options are: 1. Suggested implementation in this PR where buttons overlap tree and are located in the top right corner of the view. Main advantage - you don't loose vertical space. Most modern screens have 16:10 or 16:9 aspect ratio. Which if far from ideal for development. So vertical space is more valuable than horizontal. That is why I proposing this approach. Disadvantage - you can put less icons there. But is this really a disadvantage? Netbeans has global toolbar with common icons like new file, new folder, run, debut, search, etc. You don't really need to repeat these icons in other toolbar inside of "Projects" view. Please check how this looks on my laptop with 15 inches screen on the last screenshot in this comment. With current implementation you can easily put few more icons. 3. Toolbar - allows you to put more icons but takes vertical space. From my personal point of view with proposed implementation we can put enough icons and save vertical space. See below how toolbar looks in Eclipse. 4. Place them in tab area as was suggested by @Chris2011 in one of the comments. This is how it is implemented in Idea. But the reason why they can do this in Idea because they don't really have tabs in "tab area". Instead they have drop down to switch between views. In Netbeans we simply do not have real estate to put these icons into "tab area". But the biggest problem with such approach is that I am afraid it will be to complex. Definitely for my first ever Netbeans PR. So I am afraid two other approaches are much more practical from the efforts stand point. At lest for me at this point. So yes, I am really trying to convince you to green light current approach because of the reasons listed above. Screenshots of different implementation in different IDEs: Eclipse with toolbar  VS Code - very similar to this approach. Icons are visible only when you have mouse in the tree view. Has more icons but there is no global toolbar in VS Code  Idea - icons are in the tab are. But Idea does not have tabs. That is why it has more space in the "tab area" which allows to put icons there.  How current PR looks on my 16 inches laptop screen:  . -- 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
