Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Q on the WorkbenchPart support for IJobChangeListener


Hi Pat,

this work is being done by the UI team (platform-ui-dev), but I'll take a stab at answering. This support has been changing recently, but is available and working in the most recent integration build (I20040219).  The main interface of interest is IWorkbenchSiteProgressService. This services allows you to schedule a job in the context of a workbench part.  The workbench part will then be decorated with some "busy" indicator while the job is running (currently a changed icon).  The part can provide customized progress indication by overriding WorkbenchPart.getJobChangeListener(), and providing a listener that uses the job change events to setup and tear down a progress indicator (for example the sync view uses this to grey out the projects that are involved in the background job).  The API for this is currently not well described, and I will look into getting this improved. You can get a handle on the part site progress service like this:

IWorkbenchPart.getSite().getAdapter(IWorkbenchSiteProgressService.class)

(a bit unintuitive, but there were compatibility problems with adding methods directly to IWorkbenchSite).

The protocol for @since is that every new API method (public or protected) should have @since if the method was not added in the same release as the enclosing type.  The enclosing type should have @since if it was added after Eclipse 1.0. Feel free to enter API bugs like this directly in bugzilla when you find them, as they sometimes slip through our radar.





Pat McCarthy <patmc@xxxxxxxxxx>
Sent by: platform-core-dev-admin@xxxxxxxxxxx

02/21/2004 12:32 PM

Please respond to
platform-core-dev

To
platform-core-dev@xxxxxxxxxxx
cc
Subject
[platform-core-dev] Q on the WorkbenchPart support for IJobChangeListener






I'm trying to match this statement from the responsiveness/concurrency presentation at EclipseCON with the code:


       "WorkbenchPart will provide default progress hint if job is scheduled from a view or editor."


As I wander the WorkbenchPart I see that getAdapter has changed to return an IJobChangeListener:

       
if(IJobChangeListener.class.equals(adapter))
               
return getJobChangeListener();

The default implementation of getJobChangeListener returns a null, and I've yet to find any parts in Eclipse that are using this support, but I'd like to understand the intent.


And, just so I'm clear on your protocol for marking new API, should I expect to see @since 3.0 in changed methods such as getAdapter and/or new methods like getJobChangeListener?

I use the Java task tags to help identify the new api and these are not popping up on my radar as they are not marked as I've seen others marked.


Thanks.


Pat McCarthy


Back to the top