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.
Opening project of any project type takes a long time, blocks AWT thread and does not provide any busy indication at all. The opening should be made faster, but first of all it should not make NB gray for many seconds without even hour-glass cursor.
Agree with the busy indication. I did some experiments some time ago, and it should be possible to show a progress bar during opening the projects. OTOH, some profiling will be necessary to find out if the projects infrastructure can make the opening faster, or if the opening is slow because of individual project types.
I think the slowness is caused by individual project types (and/or ant/project), but the Open Project dialog still needs to show progress anyway.
I will attach a patch that does the following: 1. Adds a method OpenProjectList.open(Project[], boolean, boolean asynchronously). Argument asynchronously causes the open to run in a reuqest processor, showing a progress dialog. (The open method returns after all the project are opened.) 2. All calls through OpenProjects API have asynchronously == false and so the projects are opened in the caller thread. 3. Calls from: a)Open project dialog b)New project dialog c)Open required projects action use asynchronously == true and so run on background with a progress dialog. To make it all work well, it is necessary to call ProjectOpenedHook.projectOpened in the request processor thread if asynchronously == true. Jesse, could you please do a quick review of the patch? (I will remove dependecy on jdesktop.layout before commit, as it is not necessary.) Thanks.
Created attachment 25805 [details] The patch.
I guess it's OK (no time for a detailed review). But wouldn't it be simpler to have just one method, which would have current behavior if called from EQ, and new behavior if called from any other thread? Method would continue to only return when really finished.
Not sure if it would be simplier. But, there (I think) has to be a modal dialog during project open in order to disallow the user to mess with the IDE. So either the caller would have to show the dialog, or the open method would have to detect it is not in AWT thread and show the dialog somehow.
I have committed the patch, commit log attached.
Created attachment 25945 [details] The commit log.
Thanks! I like it better than the gray window we had before this fix. It would be great if the CP scanning task could start only after all projects are opened and classpath construction is complete. I know you looked into this possibility. Could you file an issue on javacore if you think this is possible? (put me on CC, please). Thanks.
Sorry guys, I don't think it's final, so please don't verify it ;) Anyway, instead of grey menu, there is a grey dialog. So I don't think it's the better fix. Also please wait for UI comments, Jindra ???
From my point of view, the current implementation is much better than the previous one. My comments regarding the current implementation are as follows: 1) Currently, when more than one project is opened, the modal dialog appears. After opening the first project, class path scanning starts. Because of that two progress bars are visible in one moment. IMO these two processes should be sequential -> after opening all projects class path-scanning starts. This was also pointed out by Tonda (“It would be great if the CP scanning task could start only after all projects are opened and classpath construction is complete. I know you looked into this possibility. Could you file an issue on javacore if you think this is possible?”) 2) Current modal dialog, which is opened after invoking the action, is too small (see attachment 1 [details]). I think this dialog can be improved-see my proposal (attachment 2 [details]). Otherwise it looks good. Thanks.
Created attachment 26069 [details] screenshot of modal dialog
Created attachment 26070 [details] proposal of modal dialog
I have improved the dialog as at the screenshot: Checking in OpenProjectList.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v <-- OpenProjectList.java new revision: 1.43; previous revision: 1.42 done Checking in Bundle.properties; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/Bundle.properties,v <-- Bundle.properties new revision: 1.68; previous revision: 1.67 done Checking in OpeningProjectPanel.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpeningProjectPanel.java,v <-- OpeningProjectPanel.java new revision: 1.2; previous revision: 1.1 done Checking in OpeningProjectPanel.form; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpeningProjectPanel.form,v <-- OpeningProjectPanel.form new revision: 1.2; previous revision: 1.1 done
.
verified in NB 5.0 (200511281900)
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/949724cb4301 User: Jesse Glick <jglick@netbeans.org> Log: Refining #65349 implementation of asynch project open to better support large source trees. - show meaningful messages in the progress handle, and make it cancelable - do not show a blocking modal dialog - permit subproject calculation to be interrupted when supported (#162612)