Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Schedule UIJob in Activator.start()
Schedule UIJob in Activator.start() [message #336330] Mon, 08 June 2009 21:48 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
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 13:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 13:27 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
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 23:00 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
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 16:51 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
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 16:27 Go to previous message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
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: Fri Apr 19 21:08:45 GMT 2024

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

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

Back to the top