Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT project view: How to programatically update the directories shown below 'Includes'?

Sorry Martin, I got distracted with something else after not finding the solution quickly. I am not surpised that "project.getFolder("Includes").refreshLocal()" did not work as Includes is not a folder. If you do project.getFolder("Includes").exists() it will return false.

Here is the info I have, hopefully you can figure out the missing piece from there. I didn't manage to verify if this works for your case.

The Content Provider providing Includes to the Common Navigator is: org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider (extending the org.eclipse.ui.navigator.navigatorContent extension point). 
IncludeRefContainer provides the view model object for the "Includes" node.
You can refresh the data by calling refresh() on the viewer passing the project as the element to refresh.
The refresh is kicked off by LanguageSettingsProvidersSerializer.notifyLanguageSettingsChangeListeners(ILanguageSettingsChangeEvent) which is kicked off by the below methods.

TL;DR:

You should be able to call this: LanguageSettingsSerializableProvider.serializeLanguageSettingsInBackground(ICConfigurationDescription) or the foreground version serializeLanguageSettings.

HTH



~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 23 November 2017 at 20:41, Martin Weber <fifteenknots505@xxxxxxxxx> wrote:
Am Dienstag, 21. November 2017, 20:58:25 CET schrieb Jonah Graham:
> On 21 November 2017 at 20:25, Martin Weber <fifteenknots505@xxxxxxxxx>
>
> wrote:
> > Am Dienstag, 21. November 2017, 19:35:33 CET schrieb Jonah Graham:
> > > Hi Martin,
> > >
> > > Here is the standard Includes virtual folder in both the (deprecated)
> >
> > C/C++
> >
> > > Projects and Project Explorer view:
> > >
> > > [image: Inline images 1]
> > >
> > > Is this what you are referring to? Does the Project Explorer update
> >
> > Yes, I am referring to that. Glad to see it in the Project Explorer, too!
> > Do you maintain that code and advise?
>
> I can try to advise, but I don't think anyone actively maintains that code
> at the moment.

Please advise.
A simple approach to just call project.getFolder("Includes").refreshLocal()
did not produce any update.

Martin

--
Cd wrttn wtht vwls s mch trsr.


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top