-
Notifications
You must be signed in to change notification settings - Fork 133
Fix compilation for CDT 8.2 #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| package it.baeyens.arduino.tools; | ||
|
|
||
| import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper; | ||
| import org.eclipse.cdt.core.model.CoreModel; | ||
| import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; | ||
| import org.eclipse.cdt.core.settings.model.ICProjectDescription; | ||
|
|
@@ -12,11 +13,12 @@ | |
| import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo; | ||
| import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject; | ||
| import org.eclipse.cdt.managedbuilder.internal.core.ToolChain; | ||
| import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider; | ||
| import org.eclipse.core.resources.IProject; | ||
| import org.eclipse.core.runtime.CoreException; | ||
| import org.eclipse.core.runtime.IProgressMonitor; | ||
|
|
||
| import it.baeyens.arduino.ui.BuildConfigurationsPage.ConfigurationDescriptor; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| @SuppressWarnings("restriction") | ||
|
|
@@ -99,7 +101,12 @@ public static void setCProjectDescription(IProject project, | |
| } | ||
| CConfigurationData data = cfg.getConfigurationData(); | ||
| ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); | ||
| ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes); | ||
|
|
||
| if (cfgDes instanceof ILanguageSettingsProvidersKeeper) { | ||
| ILanguageSettingsProvidersKeeper lspk = (ILanguageSettingsProvidersKeeper)cfgDes; | ||
| lspk.setDefaultLanguageSettingsProvidersIds(new String[] {alCfgs.get(i).ToolchainID}); | ||
| } | ||
| // ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly the if test for CDT 8.2
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that in Kepler that static method no longer exists. Maybe in newer versions there is a separate method to set indexer configuration paths.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. och they didn't make it depricated?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ConfigurationDataProvider is located at org.eclipse.cdt.managedbuilder.internal.dataprovider package that is internal. I think that internal classes doesn't need to be deprecated before their removal.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know. This code should have been in cdt |
||
| } | ||
| monitor.worked(50); | ||
| mngr.setProjectDescription(project, des); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amorellgarcia
This piece of code was removed for kepler and then brought back in because juno failed.
Before I accept your pull request I want to be sure this works in juno and kepler (and I still need to find out how I can easily test a pull request)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but this method is now removed from Kepler so I changed it with the "if block" that is below.
That block code, is written folllowing the recommendations from http://wiki.eclipse.org/CDT/ScannerDiscovery61/API
As you can in the paragraph:
"New interface ILanguageSettingsProvidersKeeper for modifying language setting providers, which is implemented by the CConfigurationDescription class. See the function testProjectDescription_ReadWriteDescription() in LanguageSettingsPersistenceProjectTests for example code.:"
This patch also should fix the issue #83