mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
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.
This commit is contained in:
parent
14d55fd8fc
commit
4a428df9d4
1 changed files with 27 additions and 17 deletions
|
@ -121,7 +121,7 @@ public class Configuration extends BuildObject implements IConfiguration {
|
||||||
//Internal Builder enable state
|
//Internal Builder enable state
|
||||||
private boolean internalBuilderEnabled;
|
private boolean internalBuilderEnabled;
|
||||||
//Internal Builder mode
|
//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);
|
// Preferences prefs = getPreferences(INTERNAL_BUILDER);
|
||||||
|
//
|
||||||
internalBuilderEnabled = prefs != null ?
|
// internalBuilderEnabled = prefs != null ?
|
||||||
prefs.getBoolean(INTERNAL_BUILDER_ENABLED, false) : false;
|
// prefs.getBoolean(INTERNAL_BUILDER_ENABLED, false) : false;
|
||||||
internalBuilderIgnoreErr = prefs != null ?
|
// internalBuilderIgnoreErr = prefs != null ?
|
||||||
prefs.getBoolean(INTERNAL_BUILDER_IGNORE_ERR, true) : true;
|
// prefs.getBoolean(INTERNAL_BUILDER_IGNORE_ERR, true) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -333,8 +333,10 @@ public class Configuration extends BuildObject implements IConfiguration {
|
||||||
postannouncebuildStep = new String(cloneConfig.postannouncebuildStep);
|
postannouncebuildStep = new String(cloneConfig.postannouncebuildStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
internalBuilderEnabled = cloneConfig.internalBuilderEnabled;
|
enableInternalBuilder(cloneConfig.isInternalBuilderEnabled());
|
||||||
internalBuilderIgnoreErr = cloneConfig.internalBuilderIgnoreErr;
|
setInternalBuilderIgnoreErr(cloneConfig.getInternalBuilderIgnoreErr());
|
||||||
|
// internalBuilderEnabled = cloneConfig.internalBuilderEnabled;
|
||||||
|
// internalBuilderIgnoreErr = cloneConfig.internalBuilderIgnoreErr;
|
||||||
|
|
||||||
// Clone the configuration's children
|
// Clone the configuration's children
|
||||||
// Tool Chain
|
// Tool Chain
|
||||||
|
@ -1726,17 +1728,17 @@ public class Configuration extends BuildObject implements IConfiguration {
|
||||||
* @param enable boolean
|
* @param enable boolean
|
||||||
*/
|
*/
|
||||||
public void enableInternalBuilder(boolean enable){
|
public void enableInternalBuilder(boolean enable){
|
||||||
if(internalBuilderEnabled != enable){
|
// if(internalBuilderEnabled != enable){
|
||||||
internalBuilderEnabled = enable;
|
internalBuilderEnabled = enable;
|
||||||
Preferences prefs = getPreferences(INTERNAL_BUILDER);
|
Preferences prefs = getPreferences(INTERNAL_BUILDER);
|
||||||
if(prefs != null){
|
if(prefs != null){
|
||||||
prefs.putBoolean(INTERNAL_BUILDER_ENABLED, internalBuilderEnabled);
|
prefs.putBoolean(INTERNAL_BUILDER_ENABLED, enable);
|
||||||
try {
|
try {
|
||||||
prefs.flush();
|
prefs.flush();
|
||||||
} catch (BackingStoreException e) {
|
} catch (BackingStoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1745,7 +1747,11 @@ public class Configuration extends BuildObject implements IConfiguration {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isInternalBuilderEnabled(){
|
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
|
* otherwise it will stop at the first build error
|
||||||
*/
|
*/
|
||||||
public void setInternalBuilderIgnoreErr(boolean ignore){
|
public void setInternalBuilderIgnoreErr(boolean ignore){
|
||||||
if(internalBuilderIgnoreErr != ignore){
|
// if(internalBuilderIgnoreErr != ignore){
|
||||||
internalBuilderIgnoreErr = ignore;
|
internalBuilderIgnoreErr = ignore;
|
||||||
Preferences prefs = getPreferences(INTERNAL_BUILDER);
|
Preferences prefs = getPreferences(INTERNAL_BUILDER);
|
||||||
if(prefs != null){
|
if(prefs != null){
|
||||||
prefs.putBoolean(INTERNAL_BUILDER_IGNORE_ERR, internalBuilderIgnoreErr);
|
prefs.putBoolean(INTERNAL_BUILDER_IGNORE_ERR, ignore);
|
||||||
try {
|
try {
|
||||||
prefs.flush();
|
prefs.flush();
|
||||||
} catch (BackingStoreException e) {
|
} catch (BackingStoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1778,7 +1784,11 @@ public class Configuration extends BuildObject implements IConfiguration {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean getInternalBuilderIgnoreErr(){
|
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){
|
private Preferences getPreferences(String name){
|
||||||
|
|
Loading…
Add table
Reference in a new issue