How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896650] |
Thu, 19 July 2012 09:47 |
Maria Kozinska Messages: 4 Registered: July 2012 |
Junior Member |
|
|
Hi all,
I'm writing my first Eclipse RCP application.
In my application the user loads some data. This is very time consuming task, so I execute it in a separate Job, with setUser(true). I would like to have similar behavior as in the Eclipse IDE: when the user starts some long lasting task, the dialog with a progress bar is shown, and s/he can choose there to run it as a background thread. Then it is shown in status line in the bottom of the IDE. Now the user can add more such threads, preview the progress or cancel any of them.
I have found at vogella a tutorial "Eclipse Jobs and Background Processing". As shown there, I implemented my own IProgressMonitor and attached it to the Tool Control in my Application.e4xmi. It works, but in this case I have to implements everything by my own. Is it possible to reuse in my application the module that is used by Eclipse IDE?
In Eclipse IDE Application model the relevant component has an ID org.eclipse.ui.trim.status.
Thanks for help,
Maria
|
|
|
|
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896742 is a reply to message #896710] |
Thu, 19 July 2012 14:41 |
Maria Kozinska Messages: 4 Registered: July 2012 |
Junior Member |
|
|
Thanks for the answer.
The problem is that I would like to have not only "Run in Background" dialog, but also ProgressView defined in org.eclipse.ui.internal.progress package, progress bar, and all the functionality that they provide for managing jobs. Does it make sense to add a dependency to org.eclipse.ui.workbench plug-in to my project, and then somehow reuse ProgressView and the other classes?
I can implement this functionality from the beginning, but if it is already implemented, why not reuse it?
In the thread you pasted, there is a sentence that I don't understand:
> There is a legacy way that parts report status to the trim within the 4.2 Workbench, but that's all done at the 4.2 Workbench level, not Eclipse4.
Does it mean that I can't use Workbench in Eclipse RCP?
Regards,
MK
|
|
|
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896788 is a reply to message #896742] |
Thu, 19 July 2012 18:53 |
|
No it does not mean you cannot use Eclipse RCP. When complete, the workbench will have gone under a complete overhaul from 3.x. (ie. The overhaul process is not complete yet.) Thus, some of the current parts in 4.x have been retrofitted to work ontop of 3.x.
I don't see a problem with adding a dependency on org.eclipse.ui.workbench (AFAIK). Most of the services similar to the progressbar / perspective switcher / etc. all reside in o.e.ui.w. If it is something you a truly concerned about, instead of creating a dependency on the bundle, just import the packages you need.
JD
(my guess is that the 4.3 release will (/come close) completely eliminate the need for the org.eclipse.ui.workbench dependency)
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03910 seconds