Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Toolchain updates

Hi Glen,

2009/5/19 Anderson, Glen <Glen.Anderson@xxxxxxxxxx>:
> Presumably it should be done
> immediately after the project is created or opened so I've implemented
> an IResourceChangeListener to track the event. The problem that I'm
> running into though is that even this event is called too early because
> the ICCConfigurationDescription objects are still not completely done
> initializing (e.g. doneInitialization() has not been called yet so
> calling setExternalSettingsProviderIds() throws an exception).
>
>        Any advice on the best strategy for initializing the providers?
> Maybe some example(s) somewhere? Of course it's entirely possible
> (probable) that I'm just missing something obvious here too :)

In my case I only hook in the external provider when certain tool
options are enabled.

If you want to hook it in immediately after project creation then you
could register a listener for CProjectDescrtipionEvents with:
CCorePlugin.getDefault().addCProjectDescriptionListener(ICProjectDescriptionListener,
CProjectDescriptionEvent.APPLIED)

These events are fired during project description life cycle including
project serializing. A fair bit of CDT is drive from these events, so
they fire multiple times after project creation as scanner discovery
etc. takes place..

Cheers,
James


Back to the top