Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Schedule UIJob in Activator.start()
Schedule UIJob in Activator.start() [message #336330] Mon, 08 June 2009 17:48 Go to next message
Eclipse UserFriend
Hello.

When I shedule an UIJob in the Activator.start() method it is never executed.
I expected that as soon as the Workbench is up it will be executed (I read that somewhere on the forum).
Any suggestions how to make this work, or what the problem could be?
I am using Eclipse 3.5 RC1.

Regards,
Kai
Re: Schedule UIJob in Activator.start() [message #336350 is a reply to message #336330] Tue, 09 June 2009 09:02 Go to previous messageGo to next message
Eclipse UserFriend
What if you use a org.eclipse.ui.progress.WorkbenchJob?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
Re: Schedule UIJob in Activator.start() [message #336355 is a reply to message #336350] Tue, 09 June 2009 09:27 Go to previous messageGo to next message
Eclipse UserFriend
Hy Paul.

> What if you use a org.eclipse.ui.progress.WorkbenchJob?

No, also does not work.

Here is what I simply do in the start method of my Activator (which extends AbstractUIPlugin):

public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;

WorkbenchJob job = new WorkbenchJob("Just a UI Job") {

@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
System.out.println("foo bar");
return Status.OK_STATUS;
}
};
job.schedule();
System.out.println("sheduled");
}

Do I miss something?

Regards,
Kai
Re: Schedule UIJob in Activator.start() [message #336375 is a reply to message #336355] Tue, 09 June 2009 19:00 Go to previous messageGo to next message
Eclipse UserFriend
By the way, here is where I read that this should work:
http://dev.eclipse.org/newslists/news.eclipse.platform/msg78 318.html
Is it a bug in 3.5? Should I create a bugzilla?

Kai Schlamp wrote:
> Hy Paul.
>
>> What if you use a org.eclipse.ui.progress.WorkbenchJob?
>
> No, also does not work.
>
> Here is what I simply do in the start method of my Activator (which
> extends AbstractUIPlugin):
>
> public void start(BundleContext context) throws Exception {
> super.start(context);
> plugin = this;
>
> WorkbenchJob job = new WorkbenchJob("Just a UI Job") {
>
> @Override
> public IStatus runInUIThread(IProgressMonitor monitor) {
> System.out.println("foo bar");
> return Status.OK_STATUS;
> }
> };
> job.schedule();
> System.out.println("sheduled");
> }
>
> Do I miss something?
>
> Regards,
> Kai
Re: Schedule UIJob in Activator.start() [message #336419 is a reply to message #336375] Wed, 10 June 2009 12:51 Go to previous messageGo to next message
Eclipse UserFriend
I just checked if this works in 3.4, but it doesn't.
Hm, now I wonder a bit how they get it running in that message I indicated.

Kai Schlamp wrote:
> By the way, here is where I read that this should work:
> http://dev.eclipse.org/newslists/news.eclipse.platform/msg78 318.html
> Is it a bug in 3.5? Should I create a bugzilla?
Re: Schedule UIJob in Activator.start() [message #336438 is a reply to message #336419] Thu, 11 June 2009 12:27 Go to previous message
Eclipse UserFriend
Kai Schlamp wrote:
> I just checked if this works in 3.4, but it doesn't.
> Hm, now I wonder a bit how they get it running in that message I indicated.
>
> Kai Schlamp wrote:
>> By the way, here is where I read that this should work:
>> http://dev.eclipse.org/newslists/news.eclipse.platform/msg78 318.html
>> Is it a bug in 3.5? Should I create a bugzilla?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=279969
Previous Topic:Documentation for variables in Plug-In extension editor
Next Topic:Commands and Toolbar and Toggle style buttons?
Goto Forum:
  


Current Time: Wed Mar 12 00:19:01 EDT 2025

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

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

Back to the top