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 47999 - Recent projects action still eagerly loads projects on startup.
Summary: Recent projects action still eagerly loads projects on startup.
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-08-26 14:42 UTC by Petr Hrebejk
Modified: 2006-03-24 10:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hrebejk 2004-08-26 14:42:53 UTC
The getPopupPresenter seems to be called when the
action is created. This loads all the recent
project. Will try to find some decent solution.
Comment 1 Jesse Glick 2004-08-27 03:12:00 UTC
1. You need to associate the URL, not the live Project, with each menu
item.

2. You need to delay creation of the menu until it is needed.

Re. #2, be sure to ask Tim for advice on making sure your solution
actually works on Macs.
Comment 2 _ tboudreau 2004-08-27 10:25:02 UTC
Could just be a trivial JMenuItem subclass that wraps the URL and
finds its icon and text on demand.  It's never going to be disabled or
do anything complicated like that.

If you're supplying the parent JMenu as the presenter, not just the
contents of the submenu, and want to resolve all the menu items when
the popup is about to be shown, listen on the ButtonModel of the JMenu
- that will actually work everywhere (addNotify() or createPopupMenu()
will *not* work everywhere).
Comment 3 Petr Hrebejk 2004-08-30 12:16:24 UTC
Checking in
projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v
 <--  OpenProjectList.java
new revision: 1.21; previous revision: 1.20
done
Processing log script arguments...
More commits to come...
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.7; previous revision: 1.6
done
Comment 4 Jesse Glick 2004-08-30 23:48:20 UTC
Petr used PopupMenuListener. Tim, does that work on Macs? Can you
check please? (Open some projects then close them one by one and make
sure File -> Recent Projects shows the right contents.)
Comment 5 Jaromir Uhrik 2005-07-14 16:18:56 UTC
Verified.