Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] SubMonitor

Sorry. I meant

   LaunchConfigurationDelegate.buildProjects(IProject[], IProgressMonitor)

But this is a platform class, thus the question should technically be directed to the platform, but since it's a general progress monitor question, anyone could answer it. I'll open a bug report with platform debug since I'm pretty sure my hunch is right.

The progress monitor rules get tricker when SubMonitor is in the mix, BTW.

John


At 03:56 PM 5/21/2010, James Blackburn wrote:
On 21 May 2010 21:23, John Cortell <rat042@xxxxxxxxxxxxx> wrote:
> Can someone more familiar with SubMonitor than I confirm that
>
> AbstractCLaunchDelegate2.buildProject(IProject, String, IProgressMonitor)
>
> should be calling pm.done() instead of localmonitor.done() in its finally
> section?

I can't see this in either AbstractCLaunchDelegate2 (or
AbstractCLaunchDelegate...). Did you mean this?

In general each method taking an IProgressMonitor expects a pristine
monitor and should call beingTask / done(). When calling other
methods, you pass in a sub monitor which does some work in the
top-level monitor (if your top-level method has beginTask'd).
http://wiki.eclipse.org/FAQ_How_do_I_use_a_SubProgressMonitor%3F
http://wiki.eclipse.org/FAQ_How_do_I_use_progress_monitors%3F

Cheers,
James

>
> John
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top