Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Language settings provider question

Hi Sergey,
First you need to implement extension point org.eclipse.cdt.core.LanguageSettingsProvider. If you need per-project (that will be per configuration) it needs to be an instance of ILanguageSettingsEditableProvider. There is a generic implementation you can use - LanguageSettingsGenericProvider.

In order to get providers created for new projects with New Project Wizard - use org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point to associate the provider with your project type. Specify attribute "languageSettingsProviders" for element "configuration" or "toolchain". There is a brief description in the extension point schema which may be useful.
If you do not use buildDefinitions extension point it is possible to attach providers to configurations programmatically. Check out test cases in org.eclipse.cdt.core.tests/org.eclipse.cdt.core.language.settings.providers, for example testConfigurationDescription_ProvidersUniqueId(). I would be up to you where to call this code from.

There is one more extension point org.eclipse.cdt.ui.LanguageSettingsProviderAssociation. You can define there a custom icon, allow or disallow editing in UI and provide a custom page for editing options in Options pane.


On Mon, Jun 17, 2013 at 7:39 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
I my plugin I need to define a per-project language settings provider. Can I use LanguageSettingsSerializableProvider class directly without subclassing it? If so, what is the right way to get an instance of the provider to call LanguageSettingsSerializableProvider.setSettingEntries(ICConfigurationDescription, IResource, String, List<ICLanguageSettingEntry>) on it?


cdt-dev mailing list

Back to the top