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 Andrew,

Thanks a lot for the suggestions. What is the right way to get an instance of LanguageSettingsGenericProvider corresponding to my LSP id and a project? I need an instance of the LSP to call setSettingEntries on it during project creation.

-sergey


On Mon, Jun 17, 2013 at 6:40 PM, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
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.

Thanks,
Andrew



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?

-sergey

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top