Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMikhail Sennikovsky2006-05-10 15:48:12 +0000
committerMikhail Sennikovsky2006-05-10 15:48:12 +0000
commit4a428df9d408891c635532086431e27eb95e7cf1 (patch)
tree83f7b735fb3695e2ff83a0adb9bb513194683d78 /build
parent14d55fd8fc726bc8ac813164ab9a94ce3d9aab1c (diff)
downloadorg.eclipse.cdt-4a428df9d408891c635532086431e27eb95e7cf1.tar.gz
org.eclipse.cdt-4a428df9d408891c635532086431e27eb95e7cf1.tar.xz
org.eclipse.cdt-4a428df9d408891c635532086431e27eb95e7cf1.zip
Do not cache settings sorred in project-scoped preferences. Work-around to bug#139911 to make the Internal Builder settings be properly restored on project import.
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java44
1 files changed, 27 insertions, 17 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
index c60eba14475..a0ba69691e0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
@@ -121,7 +121,7 @@ public class Configuration extends BuildObject implements IConfiguration {
//Internal Builder enable state
private boolean internalBuilderEnabled;
//Internal Builder mode
- private boolean internalBuilderIgnoreErr;
+ private boolean internalBuilderIgnoreErr = true;
/*
@@ -275,12 +275,12 @@ public class Configuration extends BuildObject implements IConfiguration {
}
}
- Preferences prefs = getPreferences(INTERNAL_BUILDER);
-
- internalBuilderEnabled = prefs != null ?
- prefs.getBoolean(INTERNAL_BUILDER_ENABLED, false) : false;
- internalBuilderIgnoreErr = prefs != null ?
- prefs.getBoolean(INTERNAL_BUILDER_IGNORE_ERR, true) : true;
+// Preferences prefs = getPreferences(INTERNAL_BUILDER);
+//
+// internalBuilderEnabled = prefs != null ?
+// prefs.getBoolean(INTERNAL_BUILDER_ENABLED, false) : false;
+// internalBuilderIgnoreErr = prefs != null ?
+// prefs.getBoolean(INTERNAL_BUILDER_IGNORE_ERR, true) : true;
}
/**
@@ -333,8 +333,10 @@ public class Configuration extends BuildObject implements IConfiguration {
postannouncebuildStep = new String(cloneConfig.postannouncebuildStep);
}
- internalBuilderEnabled = cloneConfig.internalBuilderEnabled;
- internalBuilderIgnoreErr = cloneConfig.internalBuilderIgnoreErr;
+ enableInternalBuilder(cloneConfig.isInternalBuilderEnabled());
+ setInternalBuilderIgnoreErr(cloneConfig.getInternalBuilderIgnoreErr());
+// internalBuilderEnabled = cloneConfig.internalBuilderEnabled;
+// internalBuilderIgnoreErr = cloneConfig.internalBuilderIgnoreErr;
// Clone the configuration's children
// Tool Chain
@@ -1726,17 +1728,17 @@ public class Configuration extends BuildObject implements IConfiguration {
* @param enable boolean
*/
public void enableInternalBuilder(boolean enable){
- if(internalBuilderEnabled != enable){
+// if(internalBuilderEnabled != enable){
internalBuilderEnabled = enable;
Preferences prefs = getPreferences(INTERNAL_BUILDER);
if(prefs != null){
- prefs.putBoolean(INTERNAL_BUILDER_ENABLED, internalBuilderEnabled);
+ prefs.putBoolean(INTERNAL_BUILDER_ENABLED, enable);
try {
prefs.flush();
} catch (BackingStoreException e) {
}
}
- }
+// }
}
/*
@@ -1745,7 +1747,11 @@ public class Configuration extends BuildObject implements IConfiguration {
* @return boolean
*/
public boolean isInternalBuilderEnabled(){
- return internalBuilderEnabled;
+ Preferences prefs = getPreferences(INTERNAL_BUILDER);
+
+ return prefs != null ?
+ prefs.getBoolean(INTERNAL_BUILDER_ENABLED, false) :
+ internalBuilderEnabled;
}
/*
@@ -1757,17 +1763,17 @@ public class Configuration extends BuildObject implements IConfiguration {
* otherwise it will stop at the first build error
*/
public void setInternalBuilderIgnoreErr(boolean ignore){
- if(internalBuilderIgnoreErr != ignore){
+// if(internalBuilderIgnoreErr != ignore){
internalBuilderIgnoreErr = ignore;
Preferences prefs = getPreferences(INTERNAL_BUILDER);
if(prefs != null){
- prefs.putBoolean(INTERNAL_BUILDER_IGNORE_ERR, internalBuilderIgnoreErr);
+ prefs.putBoolean(INTERNAL_BUILDER_IGNORE_ERR, ignore);
try {
prefs.flush();
} catch (BackingStoreException e) {
}
}
- }
+// }
}
/*
@@ -1778,7 +1784,11 @@ public class Configuration extends BuildObject implements IConfiguration {
* @return boolean
*/
public boolean getInternalBuilderIgnoreErr(){
- return internalBuilderIgnoreErr;
+ Preferences prefs = getPreferences(INTERNAL_BUILDER);
+
+ return prefs != null ?
+ prefs.getBoolean(INTERNAL_BUILDER_IGNORE_ERR, true) :
+ internalBuilderIgnoreErr;
}
private Preferences getPreferences(String name){

Back to the top