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.
The long/running job will normally run in foreground meaning that the user will not be able to interact with the IDE. It will show % progress and/or messages to the user. The user should be able to cancel the job. The user should be able to put the job in background meaning that the user should be able to interact with the IDE. The user should be able to bring the background job back to foreground.
reassigning
We would like to understand to your requirements. What are actual use cases for putting job to background/foreground. Actually we are considering not to implement this functionality in the first version unless we find reasonable usecases.
Basically, the jobs/tasks APIs should deal with the following concepts independently: o modal vs non-modal tasks - this is more in the GUI sense. In other words whether the user can interact GUI wise with the rest of the IDE while the task is in progress. o foreground vs background tasks - this is more from user point of view i.e. if the user is expressing that she is focusing on the task or not. This is more of an abstract notion. Depending on the task this may imply: - the task may run at higher vs lower priority so that it finishes quickly or slowly - the task may produce more or less verbal/animated feedback - the task may employ more or less resource locking - the task may employ a time efficient vs space efficient algorithm - and so on ... o Cancellable vs non-cancellable tasks i.e. some task may be cancelled by the user if they are running too long. Some task may require taht they finish once started. The API should provide a mechanism so that the user can shift tasks from: - Modal to/from non-modal - foreground to/from background The parsing of Classpath to build the internal AST model to support refectoring etc is a good candidate use case to apply all these concepts to. See the thread: "[openide-dev] Is there an standard API for long running job/task creation, monitoring, foregrounding, backgrounding and termination in NetBeans?" on the dev@openide.netbeans.org for somewhat detailed discussion on this.
parts of this are covered by the progress component/api proposal. I'm still against the foreground<->background (modal<->non-modal) switching ui. it's not covered by the current proposal and thus won't be implemented for 4.2 at least.
the progress api is integrated into trunk. the switching from background to foreground it not implemented in the current version and not planned in near future.
Additional info: http://www.eclipse.org/articles/index.html http://www.eclipsecon.org/2004/EclipseCon_2004_TechnicalTrackPresentations/39_A rthorne-Lemieux.pdf http://help.eclipse.org/help30/index.jsp? topic=/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm http://help.eclipse.org/help30/index.jsp? topic=/org.eclipse.platform.doc.isv/guide/workbench_jobs.htm