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.
Dev build. Started on a fresh user dir, made a new sample project, closed it. File -> Recent Projects menu was disabled. Opened a couple more existing projects, closed them, etc., menu still remains disabled. Restarted IDE. Menu enabled, but has no menu items when posted - just the weird little dot you get when you have a JMenu with no children. Opened the sample project I had made earlier. Now suddenly Recent Projects is enabled and has the correct contents. Some sort of problem with GC of projects, I suspect - I am working on changing the cache policy of ProjectManager. It is not a semantic change, but affects when it is likely that projects will be collected. Perhaps Recent Projects is unintentionally sensitive to random GC behavior.
Actually, doesn't seem related to GC; just some apparent mistakes in RecentProjects, which I will fix.
> just some apparent mistakes in RecentProjects Hard to disagree :-) I did them I should fix them. Should be easy
Should be better now. Checking in projectui/src/org/netbeans/modules/project/ui/actions/RecentProjects.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/RecentProjects.java,v <-- RecentProjects.java new revision: 1.8; previous revision: 1.7 done
BTW when I marked it STARTED I meant I already had a patch... similar to yours, in fact. Just didn't get a chance to check it in yet. Differences: 1. Rather than calling createSubMenu on propertyChange, I just set recreate to true, and fired a change in "enabled" from the action. No need to physically reconstruct the submenu until it is asked for, right? 2. I made ProjectDirListener.fileDeleted also do the same thing. Your patch does not. 2a. Should ProjectDirListener even exist? IMHO OpenProjectList should be doing this check, not the GUI action. (In promo-E there should also be an API for a project to mark itself as deleted, which would fire some change that OPL would need to listen on.)
ad 1) Only creates the item if not already created not the submenu. Needed for enabling/disabling. I bet you'll suggest to rename the method :-). ad 2) Enable/Diable must you mean. Sure ad 2a) Maybe yes. It is there to fix some bug (don't know the number) about what happens when you delete the project externaly while IDE is still running.
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.