summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Rieder2013-01-12 05:44:13 (EST)
committer Andrew Gvozdev2013-01-21 09:27:59 (EST)
commitb14645923aa933c14a2996e5c1dc365291ba079e (patch)
tree4d6796a24b9ba0a236dfc3e8f0aa3d2612f16bf0
parentc1e6dc4ca15200379de8e516335fd75d5cb99d03 (diff)
downloadorg.eclipse.cdt-b14645923aa933c14a2996e5c1dc365291ba079e.zip
org.eclipse.cdt-b14645923aa933c14a2996e5c1dc365291ba079e.tar.gz
org.eclipse.cdt-b14645923aa933c14a2996e5c1dc365291ba079e.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) {