apache / apache/netbeans

Add a "Close Right" in menu

Open
#4,710 14 comments 0 reactions 0 assignees View on GitHub
Contribution welcome good first issue kind:feature plugin-available
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### 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.

![image](https://user-images.githubusercontent.com/11049456/193430514-3cc97024-2c50-4000-a2ee-6c99fad7b78b.png)

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

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing menu actions for Close, Close All, and Close Other, then trace how the active file and tab order are determined. Reproduce the scenario with at least two open files and verify that a Close Right action removes only tabs to the right of the active one while preserving the active tab and those on the left.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.