apache / apache/netbeans

Menu actions invoked from floating Projects/Files use wrong context

Open
#5,062 2 comments 0 reactions 0 assignees View on GitHub
duplicate kind:bug needs:triage UI
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 16 release candidate

### What happened

I'm using the Projects/Files views in a separate floating window. Up to NetBeans 15, when invoking an action from the menu (such as Team > Commit), the context of the action was determined from where the keyboard focus was. If the keyboard focus was on the editor in the main window, the action would be applied to the current file. When the keyboard focus was on a node in the Projects or Files tree, the action would be applied to that node.

Now in NetBeans 16, the action seems to be always applied to the current file in the editor, even if the keyboard focus is in the Projects or Files tree (in the separate floating window).

I suspect that maybe #4603 broke the previous behavior.

### How to reproduce

_No response_

### Did this work correctly in an earlier version?

Apache NetBeans 15

### Operating System

Windows 10

### JDK

JDK 11

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

_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 reproducing the action-context difference between the main window and floating Projects/Files views in NetBeans 16, using Team > Commit with focus on the editor and then a tree node. Review the change referenced in issue #4603 and the menu action handling. Done means actions use the focused floating-window node context as they did in NetBeans 15.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.