This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[custom build of 2005-03-25 sources + 2005-03-23 nightly; JDK 1.5.0_01] Shortcut for invoking context popup menu (Shift-F10) always opens the Projects view's context menu this seems to occur on Windows only. Steps to reproduce: 1. Move focus to Editor 2. Press Shift-F10 3. The Projects View context menu pops up (in Projects view) 4. Try the same with Navigator, same behavior It started with the nightly build of 2005-03-23, 03-22 seems to be ok. I originally thought this was caused by Yarda's fix of issue #37258, but I tried to rollback his changes, rebuilt and the problem is still reproducible. Another suspect is the TopComponent fronting integrated at the same time, so I'm passing this to you Stan. Please evaluate and re-assign if it's not yours.
i added a temporary hotfix for this issue - the default action in TreeView is enabled only when the TreeView has input focus. but i'm not sure that this is the right place to fix the problem. Checking in src/org/openide/explorer/view/TreeView.java; /cvs/openide/src/org/openide/explorer/view/TreeView.java,v <-- TreeView.java new revision: 1.188; previous revision: 1.187 done
I don't think we should be putting in new workarounds until we understand which change triggered the problem and why. I investigated it more and found another change that might have caused this. See issue #40185. The change appeared for the first time in 2005-03-23 nightly build and that was when I started seeing problems with popup menus invoked via keyboard. I tried to revert some of the changes introduced by the fixing of #40185 and the problem with popup menus disappeared. IMO, the change should be completely reverted and reviewed again. The good news is that the TopComponent fronting seems to have nothing to do with this.
This issue has TM=future and it's P2, so if you don't plan to fix it for NB4.1 ask for waiver, or change TM. (I don't agree with waiver, just for note now)
Don't worry. This one is not going to be waived.
I believe that the problem is in PopupAction being able to "surviveFocusChange". Imho that is nonsence - that way the popup action trigger (s-f10) stays active for a component that was previously selected even other component is active (which seems exactly like the described behaviour). Actually I have found a comment: Index: PopupAction.java =================================================================== RCS file: /cvs/openide/src/org/openide/actions/PopupAction.java,v retrieving revision 1.8 diff -u -r1.8 PopupAction.java --- PopupAction.java 27 Aug 2003 20:35:03 -0000 1.8 +++ PopupAction.java 3 Apr 2005 06:34:03 -0000 @@ -24,8 +24,6 @@ protected void initialize() { super.initialize(); - // XXX revisit: - setSurviveFocusChange(true); // Cf. org.netbeans.core.windows.frames.NbFocusManager: putProperty ("OpenIDE-Transmodal-Action", Boolean.TRUE); // NOI18N } Ok, I think there is time to revisit this and fix it. I'll make the action non-focusSurviving.
cvs ci -m "#56986: PopupAction should not surviveFocusChange" Checking in PopupAction.java; /cvs/openide/src/org/openide/actions/PopupAction.java,v <-- PopupAction.java new revision: 1.9; previous revision: 1.8 Now the problem shall be fixed. I'll verify as soon as I get to windows box. It always worked ok on my linux 1.5.0_03. The Standa's fix shall no longer be necessary, but it can stay as it is in fact correct - the view does not want to show its popup when it does not have focus.
Ok, seems to work fine for me with a custom build (fresh update, Standa's patch to TreeView disabled). I tested on Win XP with JDK 1.4.2 and 1.5.0. Shift-F10 worked as expected in all views. I think it can be considered fixed now and the rollback of #40185 doesn't seem to be necessary anymore.
I've just verified it on two custom builds from a week ago (without Standa's patch), without my latest change, the reported problem was reproducible, with it, it was not.