Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE?
How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896650] Thu, 19 July 2012 09:47 Go to next message
Maria Kozinska is currently offline Maria KozinskaFriend
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 #896710 is a reply to message #896650] Thu, 19 July 2012 13:11 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

Maria-

Part of your problem as I understand it, is that presently (AFAIK) there isn't a status bar in Eclipse4 as there is in 3.x. So while getting a dialog to display with a "Run in Background" wouldn't be a problem, there is nothing for it to post information to. You would have to implement your own status bar manager to get that feature.

http://www.eclipse.org/forums/index.php/m/895535/

JD
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 Go to previous messageGo to next message
Maria Kozinska is currently offline Maria KozinskaFriend
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 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

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)
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896868 is a reply to message #896788] Fri, 20 July 2012 08:09 Go to previous messageGo to next message
Maria Kozinska is currently offline Maria KozinskaFriend
Messages: 4
Registered: July 2012
Junior Member
OK, so I decided to stay for a few months with a simplified implementation, and when 4.3 is released I will look for new possibilities (and maybe tutorials).
Anyway, thanks for guiding me.

Maria
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896872 is a reply to message #896868] Fri, 20 July 2012 08:36 Go to previous messageGo to next message
Valerio Santinelli is currently offline Valerio SantinelliFriend
Messages: 39
Registered: January 2012
Member
Joseph, how do you add the ProgressView from o.e.ui.w to the application model?
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896883 is a reply to message #896872] Fri, 20 July 2012 09:24 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You can't use it because it depends on the compatlayer! We are working
on views like this to be e4 ready without compat layer in 4.3

Tom

Am 20.07.12 10:36, schrieb Valerio Santinelli:
> Joseph, how do you add the ProgressView from o.e.ui.w to the application
> model?
>
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896887 is a reply to message #896883] Fri, 20 July 2012 10:03 Go to previous messageGo to next message
Maria Kozinska is currently offline Maria KozinskaFriend
Messages: 4
Registered: July 2012
Junior Member
I found similar problem on Stack Overflow (as a new user I can't paste a link), just with perspective switcher instead of progress view. I also had
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
when trying to instantiate org.eclipse.ui.internal.StandardTrim.

Thanks Tom, know I have confirmed myself that I have to wait (fortunately, I can).
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896928 is a reply to message #896887] Fri, 20 July 2012 13:13 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

FYI: (perspective switcher)
http://bugs.eclipse.org/385547
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896929 is a reply to message #896883] Fri, 20 July 2012 13:14 Go to previous messageGo to next message
Valerio Santinelli is currently offline Valerio SantinelliFriend
Messages: 39
Registered: January 2012
Member
Ok. The next question is: can I just add the compat layer until 4.3 is released and keep using mixed 4.x and 3.x code in the same plugin?

On top of that, I've got another question: what happened to the Job class? Has it already been replaced by something else or should I still rely on it through the compat layer?

Thanks!

Thomas Schindl wrote on Fri, 20 July 2012 11:24
You can't use it because it depends on the compatlayer! We are working
on views like this to be e4 ready without compat layer in 4.3

Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896931 is a reply to message #896929] Fri, 20 July 2012 13:21 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

No. There are too many issues when commingling 3.x and 4.x plugins. This is an active issues that is being addressed for the 4.3 release.

AFAIK, the jobs framework is still being worked on. There are some resources available in org.eclipse.e4.core.services.work, but I do not believe they represent finalized products so I might hesitate before using them.

JD
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #896949 is a reply to message #896931] Fri, 20 July 2012 13:48 Go to previous messageGo to next message
Valerio Santinelli is currently offline Valerio SantinelliFriend
Messages: 39
Registered: January 2012
Member
Thanks Joseph. I guess I'll stick to keeping my Eclipse RCP project running against the 3.x branch.
Is there any plan on a release date for 4.3? I understand that 4.2 is still too young to be used as the base for a production-ready project.

Joseph Carroll wrote on Fri, 20 July 2012 15:21
No. There are too many issues when commingling 3.x and 4.x plugins. This is an active issues that is being addressed for the 4.3 release.

AFAIK, the jobs framework is still being worked on. There are some resources available in org.eclipse.e4.core.services.work, but I do not believe they represent finalized products so I might hesitate before using them.

JD

Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #897020 is a reply to message #896949] Fri, 20 July 2012 19:18 Go to previous messageGo to next message
Eclipse UserFriend
Eclipse has been releasing majors on the last week of june for some time now so 4.3 is around end of June 2013.
Re: How to reuse in my Eclipse RCP application progress indicators from Eclipse IDE? [message #897051 is a reply to message #896949] Sat, 21 July 2012 07:51 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Don't miss the chance to bring in your own usecases, ... in the discussion.

It might sound strange but you should see this as a chance and not as a
problem. You can push the framework in a direction which is good for you
and probably good for others as well ;-)

Tom

Am 20.07.12 15:48, schrieb Valerio Santinelli:
> Thanks Joseph. I guess I'll stick to keeping my Eclipse RCP project
> running against the 3.x branch. Is there any plan on a release date for
> 4.3? I understand that 4.2 is still too young to be used as the base for
> a production-ready project.
>
> Joseph Carroll wrote on Fri, 20 July 2012 15:21
>> No. There are too many issues when commingling 3.x and 4.x plugins.
>> This is an active issues that is being addressed for the 4.3 release.
>>
>> AFAIK, the jobs framework is still being worked on. There are some
>> resources available in org.eclipse.e4.core.services.work, but I do not
>> believe they represent finalized products so I might hesitate before
>> using them.
>> JD
>
>
Previous Topic:(Announce) I created an Eclipse 4 Theme
Next Topic:Exporting an eclipse 4 project
Goto Forum:
  


Current Time: Thu Apr 18 11:55:32 GMT 2024

Powered by FUDForum. Page generated in 0.02987 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top