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.
It started to happen after build 200507131800 that some main menu items are initially disabled in spite of they should be enabled. I am not sure but I suspect it can be connected to changes done by Milos Klein (#35824, #39449, #37771 - introduced a replacement for JInlineMenu, make it work on macosx top menu). There is also issue 61197 which can be connected. To manually reproduce do the following: - start IDE and create Java project - close all documents in editor - restart IDE - select e.g. Source Packages node (can be other node) - open main menu Edit and Find menu item is disabled which is not correct (look at screen shot) The similar behaviour has been seen for Replace, Save and Save All actions. Tested in build 20050804-0710, WindowsXP, JDK1.5.0_04.
Created attachment 23491 [details] Screen shot
Created attachment 23492 [details] Change log of suspicious commit
there was a "feature" of jinline menu (some other special menus as well I think) that did listen to changes in the model while the menu was visible and updated the menu on the fly if something changed. This does not work on macosx at all and should be generally avoided, changing a live menu is wrong. (be it adding items, removing items, updating enabled state, name etc.)
well, the toolbar button exposes the same wrong behaviour as the menu item. Nothing changed in the toolbar action implementation AFAIK. And it seems it does so just for the Find action. Therefore I assume that there's something wrong either in the project module that is the owner of the explorer component or the search module that implements the action performer. reassinging for evaluation to search
Since it happens also with action "Test Project (Alt-F6)" and with actions from the "Run File" submenu, I think the bug is in the projects. Reassigned to projects/projectui.
It seems that the find action and the project actions does not have the same mechanism for enabling, so I do not this it is the same bug. Moreover, last week there was a bug in lookup that caused that the Run File action was disabled after startup, which should be fixed now, so please check a new build. Please file a separate bug is as much information as possible if the problem with project actions persist.
I found that CallbackSystemAction.updateEnabled() is not called when switching nodes in the Projects panel after IDE startup. Once the user switches e.g. to the Files view and then back to the Projects view, updateEnabled() is called immediately and then with every change of node selection. Not only Find... action but also Copy, Cut, Paste and maybe some other actions are affected by this bug. Reassigned to "openide/actions".
Jardo, could you please look if is something wrong with CloneableSystemAction? The problem is reproducible in Dev build 051208. Thanks
Marian, status of FindAction should work, SearchPerformer is correctly notified by node change event, the FindAction should be enabled. I don't see any problem on openide/actions side.
As I have already said, the Find action is not any specific. After startup, many actions in the main menu are disabled. E.g. if the Explorer is the active component after startup, actions Find, Copy, Test Project and possibly others are disabled until you select another top component - simple change of node selection does not help. If the document window is active after startup, you even cannot copy any string - if you select a part of text, the Copy action remains disabled.
I'm going to investigate it again. I guess the Search Performer is notified about all changes in activated nodes regardless of immediately after startup or not.
Still valid problem? If not I'm going to close as WORKSFORME.
Yes, it is still valid on Windows platform. I can reproduce it manually selecting javaapplication1 package as described in desc1 (build 20061122-0606, WindowsXP, JDK1.5.0_09). Also automated tests are still failing.
Created attachment 36207 [details] Screen shot with disabled menu items when a package is selected.
I just want to confirm that this bug still exists (tested on a build from 3 June 2007 on a Linux machine). As I was fixing bug #105616, I added many logging statements to class FindActionManager and other FindAction-related classes in module "User Utilities" (in CVS: "utilities"). These logging messages can be used for tracking down the issue of disabled menu items.
no plan to fix it now
NetBeans.org Migration: changing resolution from LATER to WONTFIX