Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2012-03-27 18:32:54 -0400
committerAndrew Gvozdev2012-03-27 18:32:54 -0400
commitfaf497d3615e8de2b2ba8e411dbf5c24f58843ef (patch)
tree9ff2072a6f376aced8c8331beff987ba316b7ade /build/org.eclipse.cdt.make.core
parent5326d2930a39ccde30a44956120dbba1cb0e6cda (diff)
downloadorg.eclipse.cdt-faf497d3615e8de2b2ba8e411dbf5c24f58843ef.tar.gz
org.eclipse.cdt-faf497d3615e8de2b2ba8e411dbf5c24f58843ef.tar.xz
org.eclipse.cdt-faf497d3615e8de2b2ba8e411dbf5c24f58843ef.zip
bug 71511: Some house-cleaning
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java14
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/StreamMonitor.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java14
3 files changed, 19 insertions, 11 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
index 87465d3896..7275c8e80f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
@@ -58,7 +58,10 @@ import org.eclipse.core.runtime.jobs.Job;
*/
public class MakeBuilder extends ACBuilder {
public final static String BUILDER_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"; //$NON-NLS-1$
- private static final int MONITOR_SCALE = 100;
+ private static final int PROGRESS_MONITOR_SCALE = 100;
+ private static final int TICKS_STREAM_PROGRESS_MONITOR = 1 * PROGRESS_MONITOR_SCALE;
+ private static final int TICKS_DELETE_MARKERS = 1 * PROGRESS_MONITOR_SCALE;
+ private static final int TICKS_EXECUTE_COMMAND = 1 * PROGRESS_MONITOR_SCALE;
private BuildRunnerHelper buildRunnerHelper = null;
@@ -158,7 +161,8 @@ public class MakeBuilder extends ACBuilder {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
- monitor.beginTask(MakeMessages.getString("MakeBuilder.Invoking_Make_Builder") + project.getName(), 3 * MONITOR_SCALE); //$NON-NLS-1$
+ monitor.beginTask(MakeMessages.getString("MakeBuilder.Invoking_Make_Builder") + project.getName(), //$NON-NLS-1$
+ TICKS_STREAM_PROGRESS_MONITOR + TICKS_DELETE_MARKERS + TICKS_EXECUTE_COMMAND);
IPath buildCommand = info.getBuildCommand();
if (buildCommand != null) {
@@ -187,12 +191,12 @@ public class MakeBuilder extends ACBuilder {
parsers.add(parserSD);
buildRunnerHelper.setLaunchParameters(launcher, buildCommand, args, workingDirectoryURI, envp);
- buildRunnerHelper.prepareStreams(epm, parsers, console, new SubProgressMonitor(monitor, 1 * MONITOR_SCALE, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ buildRunnerHelper.prepareStreams(epm, parsers, console, new SubProgressMonitor(monitor, TICKS_STREAM_PROGRESS_MONITOR, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
- buildRunnerHelper.removeOldMarkers(project, new SubProgressMonitor(monitor, 1 * MONITOR_SCALE, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ buildRunnerHelper.removeOldMarkers(project, new SubProgressMonitor(monitor, TICKS_DELETE_MARKERS, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
buildRunnerHelper.greeting(kind);
- int state = buildRunnerHelper.build(new SubProgressMonitor(monitor, 1 * MONITOR_SCALE, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ int state = buildRunnerHelper.build(new SubProgressMonitor(monitor, TICKS_EXECUTE_COMMAND, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
buildRunnerHelper.close();
buildRunnerHelper.goodbye();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/StreamMonitor.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/StreamMonitor.java
index dde487ec6b..246880bbcb 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/StreamMonitor.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/StreamMonitor.java
@@ -20,7 +20,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
*
*/
@Deprecated
-public class StreamMonitor extends org.eclipse.cdt.internal.core.StreamMonitor {
+public class StreamMonitor extends org.eclipse.cdt.internal.core.StreamProgressMonitor {
public StreamMonitor(IProgressMonitor mon, OutputStream cos, int totalWork) {
super(mon, cos, totalWork);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
index c6c96d541f..70773c5250 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
@@ -56,7 +56,10 @@ import org.osgi.service.prefs.BackingStoreException;
public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
private static final String GMAKE_ERROR_PARSER_ID = "org.eclipse.cdt.core.GmakeErrorParser"; //$NON-NLS-1$
private static final String PREF_CONSOLE_ENABLED = "org.eclipse.cdt.make.core.scanner.discovery.console.enabled"; //$NON-NLS-1$
- private static final int MONITOR_SCALE = 100;
+
+ private static final int PROGRESS_MONITOR_SCALE = 100;
+ private static final int TICKS_STREAM_PROGRESS_MONITOR = 1 * PROGRESS_MONITOR_SCALE;
+ private static final int TICKS_EXECUTE_PROGRAM = 1 * PROGRESS_MONITOR_SCALE;
protected IResource resource;
protected String providerId;
@@ -97,7 +100,8 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
- monitor.beginTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs"), 2 * MONITOR_SCALE); //$NON-NLS-1$
+ monitor.beginTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs"), //$NON-NLS-1$
+ TICKS_STREAM_PROGRESS_MONITOR + TICKS_EXECUTE_PROGRAM);
// call a subclass to initialize protected fields
if (!initialize()) {
@@ -131,12 +135,12 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
if (parser != null) {
parsers.add(parser);
}
-
+
buildRunnerHelper.setLaunchParameters(launcher, program, comandLineOptions, workingDirectoryURI, envp );
- buildRunnerHelper.prepareStreams(epm, parsers, console, new SubProgressMonitor(monitor, 1 * MONITOR_SCALE, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ buildRunnerHelper.prepareStreams(epm, parsers, console, new SubProgressMonitor(monitor, TICKS_STREAM_PROGRESS_MONITOR, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
buildRunnerHelper.greeting(MakeMessages.getFormattedString("ExternalScannerInfoProvider.Greeting", project.getName())); //$NON-NLS-1$
- buildRunnerHelper.build(new SubProgressMonitor(monitor, 1 * MONITOR_SCALE, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ buildRunnerHelper.build(new SubProgressMonitor(monitor, TICKS_EXECUTE_PROGRAM, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
buildRunnerHelper.close();
buildRunnerHelper.goodbye();

Back to the top