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.

Bug 48272 - Erratic behavior of Recent Projects menu item
Summary: Erratic behavior of Recent Projects menu item
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Hrebejk
Depends on:
Blocks: 41535
  Show dependency tree
Reported: 2004-08-31 22:32 UTC by Jesse Glick
Modified: 2006-03-24 09:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-08-31 22:32:45 UTC
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
Comment 1 Jesse Glick 2004-08-31 23:10:07 UTC
Actually, doesn't seem related to GC; just some apparent mistakes in
RecentProjects, which I will fix.
Comment 2 Petr Hrebejk 2004-09-01 13:53:07 UTC
> just some apparent mistakes in RecentProjects

Hard to disagree :-) I did them I should fix them. Should be easy
Comment 3 Petr Hrebejk 2004-09-01 14:03:43 UTC
Should be better now.

Checking in
new revision: 1.8; previous revision: 1.7
Comment 4 Jesse Glick 2004-09-01 19:30:51 UTC
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.


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.)
Comment 5 Petr Hrebejk 2004-09-02 10:36:53 UTC
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.
Comment 6 Marian Mirilovic 2005-12-20 15:46:08 UTC
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.