apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.67k stars 855 forks source link

Menu actions invoked from floating Projects/Files use wrong context #5062

Open nmatt opened 1 year ago

nmatt commented 1 year ago

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

nmatt commented 5 days ago

@errael: It would be great if you could take a look at this, if it's an unintended side effect of https://github.com/apache/netbeans/issues/4437.

EDIT: Sorry, meant to comment this on https://github.com/apache/netbeans/issues/7952.

nmatt commented 5 days ago

Duplicate of https://github.com/apache/netbeans/issues/7952, which has better information.