Richard7111 commented on code in PR #4792:
URL: https://github.com/apache/netbeans/pull/4792#discussion_r996418994
##########
platform/core.multitabs/src/org/netbeans/core/multitabs/impl/DocumentSwitcherTable.java:
##########
@@ -152,7 +152,21 @@ boolean onMouseEvent( MouseEvent e ) {
TabActionEvent tae = new TabActionEvent( this,
TabbedContainer.COMMAND_CLOSE, tabIndex );
controller.postActionEvent( tae );
return true;
+ }else if(tabIndex == -1){
+ List<TabData> tabs =
controller.getTabModel().getTabs();
+ ProjectProxy project = item.project;
+ ProjectSupport projectSupport =
ProjectSupport.getDefault();
+ for(int i = tabs.size(); i-- > 0;){
+ TabData projectTab = tabs.get(i);
Review Comment:
> Please try to extract the new code which closes the tabs into a package
private utility method and put it into DocumentSwitcherTable . Since
ButtonPupupSwitcher is in the same package as DocumentSwitcherTable and can
simply call its method without code duplication.
Somehow I pushed older version of the code, difference should be visible in
the next commit. When closing tabs using DELETE key, I have to call
SwingUtilities if all the tabs are closed. Otherwise the popup stays open. That
is why I am keeping it outside of shared method.
--
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