Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Lazy pattern for CDT project setting changes

Hi,

I have the requirement to detect user changes on CDT project settings (e.g., add a new include path) and react on it. I'm aware of the interface ICProjectDescriptionListener and was able to use it and basically it works just fine. My problem is that I have to use the early startup mechanism of Eclipse (org.eclipse.ui.startup extension point) to register myself with addCProjectDescriptionListener and to attach an ICProjectDescriptionListener to the CoreModel. Otherwise I would not get notified about project changes while my plug-in has not been loaded.

The solution works, but it's ugly because it circumvents Eclipse lazy-loading mechanism. I know that ISaveParticipant is a possibility to track changes when a plug-in is not yet loaded through queuing of change events. After the plug-in is loaded it gets a single resource change event with alll changes that have occured during the time it was not active. But as far as I know this only works for resource changes...

My question for you is the following: Is there something similar like this for CDT? I would like to get the project setting changes that occured in the meantime. It doesn't have to be a proper delta, it would be enough for me to know that the user changed something.

Thanks,
Henry

Back to the top