Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorbjörn Svensson2020-11-08 12:10:18 -0500
committerJonah Graham2020-11-09 14:17:15 -0500
commit1d226f92731b30e3894ccdf884341e58d9990508 (patch)
treebdeb4e45ed2aa959e53d87d74b99b7553ed6d67a /build/org.eclipse.cdt.managedbuilder.core/src/org
parentc0b26f9993a19e96f83098716b92f3e166361f41 (diff)
downloadorg.eclipse.cdt-1d226f92731b30e3894ccdf884341e58d9990508.tar.gz
org.eclipse.cdt-1d226f92731b30e3894ccdf884341e58d9990508.tar.xz
org.eclipse.cdt-1d226f92731b30e3894ccdf884341e58d9990508.zip
Bug 568397: Hide "Build settings" if using custom command
When unchecking the "Use default build command" checkbox, hide the GUI options to configure the flags as the user should have full control. This solution was discussed in https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/171735 Change-Id: Ifbd67b279db55f5a83f4a660b9a1248e5c021df2 Also-by: cartu38 opendev <cartu38.opendev@gmail.com> Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core/src/org')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
index 2f1cc38fa69..f658b9e67c9 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
@@ -1086,18 +1086,20 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
@Override
public String getArguments() {
String args = getArgumentsAttribute();
- String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
- int parallelNum = getParallelizationNum();
- String parallelCmd = isParallelBuildOn() ? getParallelizationCmd(parallelNum) : EMPTY_STRING;
+ if (isDefaultBuildCmd()) {
+ String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
+ int parallelNum = getParallelizationNum();
+ String parallelCmd = isParallelBuildOn() ? getParallelizationCmd(parallelNum) : EMPTY_STRING;
- String reversedStopOnErrCmd = getStopOnErrCmd(!isStopOnError());
- String reversedParallelBuildCmd = !isParallelBuildOn() ? getParallelizationCmd(parallelNum) : EMPTY_STRING;
+ String reversedStopOnErrCmd = getStopOnErrCmd(!isStopOnError());
+ String reversedParallelBuildCmd = !isParallelBuildOn() ? getParallelizationCmd(parallelNum) : EMPTY_STRING;
- args = removeCmd(args, reversedStopOnErrCmd);
- args = removeCmd(args, reversedParallelBuildCmd);
+ args = removeCmd(args, reversedStopOnErrCmd);
+ args = removeCmd(args, reversedParallelBuildCmd);
- args = addCmd(args, stopOnErrCmd);
- args = addCmd(args, parallelCmd);
+ args = addCmd(args, stopOnErrCmd);
+ args = addCmd(args, parallelCmd);
+ }
return args != null ? args.trim() : null;
}

Back to the top