1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +02:00

Replace SubProgressMonitor with SubMonitor

Signed-off-by: Stefan Xenos <sxenos@google.com>
Change-Id: Iabdf98ac10cbf9924c0b85e446a2de22f609deea
This commit is contained in:
Stefan Xenos 2015-05-06 22:23:38 -07:00 committed by Sergey Prigogin
parent 79ff9f136c
commit f893d9590c

View file

@ -32,7 +32,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.osgi.service.environment.Constants; import org.eclipse.osgi.service.environment.Constants;
@ -350,13 +350,13 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
public void run(IProgressMonitor monitor) throws CoreException { public void run(IProgressMonitor monitor) throws CoreException {
if (runAllBuidlers) { if (runAllBuidlers) {
ICommand[] commands = project.getDescription().getBuildSpec(); ICommand[] commands = project.getDescription().getBuildSpec();
monitor.beginTask("", commands.length); //$NON-NLS-1$ SubMonitor subMonitor = SubMonitor.convert(monitor, commands.length);
for (ICommand command : commands) { for (ICommand command : commands) {
if (command.getBuilderName().equals(builderID)) { if (command.getBuilderName().equals(builderID)) {
project.build(IncrementalProjectBuilder.FULL_BUILD, builderID, infoMap, new SubProgressMonitor(monitor, 1)); project.build(IncrementalProjectBuilder.FULL_BUILD, builderID, infoMap, subMonitor.newChild(1));
} else { } else {
project.build(IncrementalProjectBuilder.FULL_BUILD, command.getBuilderName(), project.build(IncrementalProjectBuilder.FULL_BUILD, command.getBuilderName(),
command.getArguments(), new SubProgressMonitor(monitor, 1)); command.getArguments(), subMonitor.newChild(1));
} }
} }
monitor.done(); monitor.done();