| Summary: | New project creation progress should appear in progress monitor at bottom of wizard | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Will Smythe <smythew> | ||||
| Component: | EDT | Assignee: | Xiao Bin Chen <xiaobinc> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | chenzhh | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Will Smythe
Ji Yong - I have been playing with progress monitors / runnables within SWT JFace wizards over the last few days and am happy to "consult" on this one. Pretty easy to leverage the wizard's progress monitor, even if you have multiple tasks/runnables that need to happen when the Finish button is pressed. Created attachment 202794 [details]
Complete this functionality
Add wizard progress monitor for new project wizard. The creation of a new 'RUI' project still *feels* slow and numerous dialogs appear and go away during the Finish process. In general, no workspace operations (i.e. build) should be happening until everything has been added to and configured in the workspace. All building should happen after the wizard goes away, not while the wizard is still open (this includes generation of parts that got imported into the workspace by the new project wizard). I think this is important, as it's one of the first things new users will see. deferring - this is a non-trivial change, too risky for this point in the project. It's just a usability item. While I was adding support for a new project template (Hello world), I took a look at this bug. Overall, the current code is good -- each major task that is performed during the new project creation is isolated into its own operation. The problem is that each operation is invoked separately as a workspacemodifyoperation, which causes the workspace to do a bunch of work after each of the operations versus waiting until all 15 operations are done before doing anything (i.e. building, etc).
I played around with wrapping these 15 operations into a single workspacemodifyoperation and it worked pretty well, as far as I could tell. It also checks to see whether the user has cancelled the operation..
NewEGLProjectWizard.performFinish()
...
final List ops = ProjectFinishUtility.getCreateProjectFinishOperations((IProjectTemplateClass) template.getProjectTemplateClass(), model, 0, rule);
getContainer().run(true, true, new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor) throws CoreException {
for(Iterator it = ops.iterator(); it.hasNext();)
{
Object obj = it.next();
IRunnableWithProgress runnable = (IRunnableWithProgress)obj;
try {
runnable.run(monitor);
} catch (Exception ex) {
ex.printStackTrace();
}
if (monitor.isCanceled()) {
break;
}
}
}
});
There is one issue with the task name -- currently each operation is setting it via monitor.beginTask .. but beginTask can only be called once. Need to think about the right way to do this, such that the operations can still work outside the context of this wizard, but provide status to whoever has invoked it.
I still think this is important because it's one of the first things new users see. Fixed. Don't know if nightly build works now. If it does,please update to the current nightly build. and verify it. In the fix:The progress status of importing action of rui widget and dojowidet project(zipfile) could be represent rightly in the status bar. And after the new fix, the spending time of create rui project will be much reduced. I test it in my machine. About 10s could create a new rui project. I think it's much better now. Any problem, please reopen it. Thanks xiaobin. Looks good in 2/20 build. |