Oleh: rodin | 4.02.2007

Busy, busy, busy … now with icon

I have noticed the latest eclipse 3.3.M4 has a new API to implement
‘busy’ notice on the heading tab. It’s quite trivial then, since for
background processing we usually start with a Job, schedule(), and then add
a job change state listener.

Previous code is


Job job = new Job("My Job") {
//run implementation here
};
job.schedule()

changed to


Job job = new Job("My Job") {
//run implementation here
};

IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite()
.getAdapter(IWorkbenchSiteProgressService.class);
service.schedule(job);

Then every time you get job running, a busy icon will appear on the view heading tab.

Taken from somewhere in the news.eclipse.org

About these ads

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Kategori

Ikuti

Get every new post delivered to your Inbox.

%d bloggers like this: