Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] supporting 8.0.x and 8.1.x with legacy scanner discovery

Actually, what you need is just to add the old scanner discovery profile to your toolchain explicitly (scannerConfigDiscoveryProfileId). Normally you would add them to input type (if you have those in your toolchain) since we have slightly different profiles for C and C++. But you can add them on toolchain level as well. You also need  MBSLanguageSettingsProvider to be in the LSP providers list. Actually, I see that it should be there by default already so you don't need to bother.
If you do not wish use new scanner discovery put only org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider on configuration level to override defaults from parent configuration and toolchains. You can also hide its page in UI in Preferences->C/C++->Property Page Settings.

But if you are interested to use the new discovery I'd be happy to help.

Thanks,
Andrew

On Tue, Aug 21, 2012 at 6:11 PM, Siva Velusamy <siva.velusamy@xxxxxxxxx> wrote:
On Tue, Aug 21, 2012 at 2:32 PM, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
> You can try to add following attribute to your configuration or toolchain:
>
> languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider"
>
> Usually it is best to avoid reflection mechanism.
>

I agree, I'd prefer to use this approach. Two questions though:

1. Since this is just an attribute, the pre-8.1 plugin should just
ignore this. I verified that it does ignore it, but I want to confirm
if I'm understanding it correctly.

2. With 8.1 though, I see an exception generated:

java.lang.IllegalArgumentException: Language Settings Providers must
have unique ID. Duplicate
ID=org.eclipse.cdt.ui.UserLanguageSettingsProvider
        at org.eclipse.cdt.internal.core.settings.model.CConfigurationSpecSettings.setLanguageSettingProviders(CConfigurationSpecSettings.java:1030)
        at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescription.setLanguageSettingProviders(CConfigurationDescription.java:835)
        at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.setDefaultLanguageSettingsProviders(ConfigurationDataProvider.java:606)
        at org.eclipse.cdt.managedbuilder.ui.wizards.STDWizardHandler.setProjectDescription(STDWizardHandler.java:107)
        at org.eclipse.cdt.managedbuilder.ui.wizards.STDWizardHandler.convertProject(STDWizardHandler.java:120)

Could you explain what adding that line actually does? Removing
"org.eclipse.cdt.ui.UserLanguageSettingsProvider" makes it not throw
the exception, but then the indexer isn't resolving headers anymore.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top