Add a "Close Right" in menu
Description
Add a "Close Right" function on the menu along "Close", "Close All" and "Close Other".
When at least 2 files have been opened, we could close all windows on the right of the current active one.

It would be the same implementation as in Chrome or FF.
Use case/motivation
When doing a search, I often open "new" windows which are actually not currently usefull and it clutters the tabs. So I spend a lot of time closing them individually. It would save a lot of time to be able to close them all at once.
I cannot use "Close Other" or "Close All", because the tabs on the left are usually the ones I am working on.
When a lot of windows have been opened if the search was too generic, I use this work around:
- Close All
- Open all modified files from the Git menu
Related issues
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
makes sense. Added good first issue label in case someone wants to implement it.
I just checked how FF solved this and it has Close Tabs to Left, .. Right and Close Other Tabs in a sub menu.
NetBeans however also supports multi row tabs which would make this a bit more difficult to implement.
When too much files is opened I like to use documents list format for manage it:

but in that format would be good to have close button to group of documents:

@6PATyCb thats a good idea but next time, please open a new issue. I moved it to #4760
@6PATyCb thats a good idea but next time, please open a new issue. I moved it to #4760
I thought this was just part of the discussion about usability of documents tabs, but since it looks good as a separate feature, why not :)
Hello can @fredericch, @6PATyCb, or anyone assign me this issue please?
@mbien can you please?
@tc430gi Actually you can open a PR or a draft when ready so that a reviewer can take a look. :)
Hello can @fredericch, @6PATyCb, or anyone assign me this issue please?
I don't have a rights
you can simply open a PR if you want to contribute a change. You don't even need an issue for that or someone assigning an issue to you.
Can you help me navigate a little bit in the project? @mbien
@tc430gi I don't know that area well but after searching a bit around:
the logic for closing tabs seems to be here: https://github.com/apache/netbeans/blob/2c27f5a31b64dc0a8e3ddbd08a3223f7ed1d141e/platform/core.windows/src/org/netbeans/core/windows/view/ui/TabbedHandler.java#L317-L333
actions are setup here (and the method below too): https://github.com/apache/netbeans/blob/c084119009d2e0f736f225d706bc1827af283501/platform/core.windows/src/org/netbeans/core/windows/actions/ActionUtils.java#L60-L77
If you need more info it is probably better to ask on the dev list or open a discussion on github.
Once https://github.com/apache/netbeans/pull/4792 merges I'll submit a PR which does a few changes in related areas in ActionUtils.
Most likely you'd need a new action similar to CloseAllButThisAction and CloseAllDocumentsAction.
this plugin sounds like it is covering exactly this features:
https://plugins.netbeans.apache.org/catalogue/?id=78
I already have a plugin for this feature which is open source (originally implemented by @AlexanderYastrebov), maybe the code helps to implement this feature: https://github.com/funfried/nb-editor-close-left-right
Edit: Just saw @mbien already put a link to the plugin catalogue page of the plugin
is this issue still open to contribute on? @mbien