summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Rieder2013-01-12 05:44:13 (EST)
committer Andrew Gvozdev2013-01-13 09:58:16 (EST)
commit2f425c4386bf457f46345c32ccee2fb410a92ecf (patch)
tree8eb36574cf66ebe55c6084911505355bf151d14d
parent3f93648a5886ba4cec777efd51b3702149a7e7f2 (diff)
downloadorg.eclipse.cdt-2f425c4386bf457f46345c32ccee2fb410a92ecf.zip
org.eclipse.cdt-2f425c4386bf457f46345c32ccee2fb410a92ecf.tar.gz
org.eclipse.cdt-2f425c4386bf457f46345c32ccee2fb410a92ecf.tar.bz2
bug 395307: Switching back to project specific language settings provider seems to be incorrect
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
index bced35b..fefcb4f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
@@ -479,13 +479,16 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
newProvider = LanguageSettingsManager.getWorkspaceProvider(id);
} else {
// Toggle to configuration-owned provider
- try {
- ILanguageSettingsProvider rawProvider = LanguageSettingsManager.getRawProvider(provider);
- if (rawProvider instanceof ILanguageSettingsEditableProvider) {
- newProvider = ((ILanguageSettingsEditableProvider) rawProvider).cloneShallow();
+ newProvider = getInitialProvider(id);
+ if(newProvider == null) {
+ try {
+ ILanguageSettingsProvider rawProvider = LanguageSettingsManager.getRawProvider(provider);
+ if (rawProvider instanceof ILanguageSettingsEditableProvider) {
+ newProvider = ((ILanguageSettingsEditableProvider) rawProvider).cloneShallow();
+ }
+ } catch (CloneNotSupportedException e) {
+ CUIPlugin.log("Error cloning provider " + id, e); //$NON-NLS-1$
}
- } catch (CloneNotSupportedException e) {
- CUIPlugin.log("Error cloning provider " + id, e); //$NON-NLS-1$
}
}
if (newProvider != null) {