Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-11-14 12:34:48 -0500
committerAndrew Gvozdev2011-11-14 14:42:16 -0500
commitd4c2ce5e981743d21abc37418097c2d45491fe59 (patch)
tree9cf2e61452f39d91e16cf448a3eeb8ea35d4f3e0 /build/org.eclipse.cdt.managedbuilder.ui
parentf04bd57f837ba147fc3ad4fcedd60ad8c481a12d (diff)
downloadorg.eclipse.cdt-d4c2ce5e981743d21abc37418097c2d45491fe59.tar.gz
org.eclipse.cdt-d4c2ce5e981743d21abc37418097c2d45491fe59.tar.xz
org.eclipse.cdt-d4c2ce5e981743d21abc37418097c2d45491fe59.zip
bug 259768: "Use optimal jobs number" highly misleading.
Allow Internal builder unlimited jobs
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildBehaviourTab.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildBehaviourTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildBehaviourTab.java
index 543259ae73..02b45c2099 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildBehaviourTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildBehaviourTab.java
@@ -172,7 +172,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
public void widgetSelected(SelectionEvent event) {
if (b_parallelUnlimited.getSelection()) {
setParallelDef(true);
- setParallelNumber(Integer.MAX_VALUE);
+ setParallelNumber(Builder.UNLIMITED_JOBS);
updateButtons();
}
}});
@@ -347,9 +347,6 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
private void updateParallelBlock() {
// note: for multi-config selection bldr is from Active cfg
- boolean isAnyInternalBuilder = bldr.isInternalBuilder();
- boolean isAnyExternalBuilder = ! bldr.isInternalBuilder();
-
boolean isParallelSupported = bldr.supportsParallelBuild();
boolean isParallelOn = bldr.isParallelBuildOn();
int triSelection = isParallelOn ? TRI_YES : TRI_NO;
@@ -357,7 +354,6 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
int parallelizationNumInternal = bldr.getParallelizationNumAttribute();
int optimalParallelNumber = bldr.getOptimalParallelJobNum();
int parallelNumber = bldr.getParallelizationNum();
- boolean isUnlimited = parallelizationNumInternal == Integer.MAX_VALUE;
if (icfg instanceof ICMultiItemsHolder) {
IConfiguration[] cfgs = (IConfiguration[])((ICMultiItemsHolder)icfg).getItems();
@@ -372,19 +368,15 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
isAnyParallelOn = isAnyParallelOn || builder.isParallelBuildOn();
isAnyParallelSupported = isAnyParallelSupported || builder.supportsParallelBuild();
- isAnyInternalBuilder = isAnyInternalBuilder || builder.isInternalBuilder();
- isAnyExternalBuilder = isAnyExternalBuilder || !builder.isInternalBuilder();
}
// reset initial display to "optimal" to enhance user experience:
if ((!isParallelSupported && isAnyParallelSupported) // parallel is supported by other than Active cfg
- || (!isParallelOn && isAnyParallelOn) // prevent showing the 1 job as parallel in the spinner
- || (isUnlimited && isAnyInternalBuilder) // can't show "unlimited" as it won't be selectable if Internal Builder present
+ || (!isParallelOn && isAnyParallelOn) // prevent showing the 1 job as parallel in the spinner
) {
isParallelSupported = true;
parallelizationNumInternal = -optimalParallelNumber;
parallelNumber = optimalParallelNumber;
- isUnlimited = false;
}
if (isParallelSupported && isParallelDiffers) {
triSelection = TRI_UNKNOWN;
@@ -394,7 +386,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
b_parallel.setVisible(isParallelSupported);
b_parallelOptimal.setVisible(isParallelSupported);
b_parallelSpecific.setVisible(isParallelSupported);
- b_parallelUnlimited.setVisible(isParallelSupported && isAnyExternalBuilder);
+ b_parallelUnlimited.setVisible(isParallelSupported);
s_parallelNumber.setVisible(isParallelSupported);
if (isParallelSupported) {
@@ -404,10 +396,11 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
b_parallelOptimal.setText(MessageFormat.format(Messages.BuilderSettingsTab_UseOptimalJobs, optimalParallelNumber));
b_parallelOptimal.setEnabled(isParallelSelected);
b_parallelSpecific.setEnabled(isParallelSelected);
- b_parallelUnlimited.setEnabled(isParallelSelected && !isAnyInternalBuilder);
+ b_parallelUnlimited.setEnabled(isParallelSelected);
if (isParallelSelected) {
boolean isOptimal = parallelizationNumInternal <= 0;
+ boolean isUnlimited = parallelizationNumInternal == Builder.UNLIMITED_JOBS;
b_parallelOptimal.setSelection(isOptimal);
b_parallelSpecific.setSelection(!isOptimal && !isUnlimited);

Back to the top