neilcsmith-net commented on issue #8501: URL: https://github.com/apache/netbeans/issues/8501#issuecomment-2872027914
I had a feeling you were looking at the wrong code when looking at `CloseButtonTabbedPane`, but this led to a little rabbit warren! 😄 That class is used for things like the tabs in the `Output` component. For the standard window tabs I think the problem is at https://github.com/apache/netbeans/blob/master/platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/AbstractTabCellRenderer.java#L119 The if check here should be checking if the close button is active before setting the command, like the later if check (which is also hit but doesn't unset the command). On the other hand, the handling for this is different if multitabs are enabled, assuming an uncloseable TC in the editor area, which will route through the code at https://github.com/apache/netbeans/blob/master/platform/core.multitabs/src/org/netbeans/core/multitabs/Controller.java#L132 It all seems a little weird to me that this is handled in the view of the tabs, rather than in the underlying UI model? eg. maybe better handled somewhere like https://github.com/apache/netbeans/blob/master/platform/core.windows/src/org/netbeans/core/windows/view/ui/TabbedHandler.java#L308 ? Overriding `TopComponent::canClose` doesn't quite have the same semantics of disabling only UI closing? -- 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-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists