|
1 | 1 | package it.baeyens.arduino.tools;
|
2 | 2 |
|
| 3 | +import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper; |
3 | 4 | import org.eclipse.cdt.core.model.CoreModel;
|
4 | 5 | import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
5 | 6 | import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
|
12 | 13 | import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
13 | 14 | import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
14 | 15 | import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
15 |
| -import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider; |
16 | 16 | import org.eclipse.core.resources.IProject;
|
17 | 17 | import org.eclipse.core.runtime.CoreException;
|
18 | 18 | import org.eclipse.core.runtime.IProgressMonitor;
|
| 19 | + |
19 | 20 | import it.baeyens.arduino.ui.BuildConfigurationsPage.ConfigurationDescriptor;
|
| 21 | + |
20 | 22 | import java.util.ArrayList;
|
21 | 23 |
|
22 | 24 | @SuppressWarnings("restriction")
|
@@ -99,7 +101,12 @@ public static void setCProjectDescription(IProject project,
|
99 | 101 | }
|
100 | 102 | CConfigurationData data = cfg.getConfigurationData();
|
101 | 103 | ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
102 |
| - ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes); |
| 104 | + |
| 105 | + if (cfgDes instanceof ILanguageSettingsProvidersKeeper) { |
| 106 | + ILanguageSettingsProvidersKeeper lspk = (ILanguageSettingsProvidersKeeper)cfgDes; |
| 107 | + lspk.setDefaultLanguageSettingsProvidersIds(new String[] {alCfgs.get(i).ToolchainID}); |
| 108 | + } |
| 109 | +// ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes); |
103 | 110 | }
|
104 | 111 | monitor.worked(50);
|
105 | 112 | mngr.setProjectDescription(project, des);
|
|
0 commit comments