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'?

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

On 3 December 2017 at 15:22, Martin Weber <fifteenknots505@xxxxxxxxx> wrote:
>
> Am Donnerstag, 23. November 2017, 22:29:57 CET schrieb Jonah Graham:
>
> > Sorry Martin, I got distracted with something else after not finding the
>
> Hi Jonah,
> thanks for your thorough investigation.
>
> > 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.
>
> Could you explain how to retrieve that viewer? I tried to retrieve it via
> PlatformUI.getWorkbench(), but no luck. (I'm not too familiar with JFace, I
> admit)

You shouldn't have to access the viewer directly, unless you still
aren't getting the updates with what you did below. If you put a
breakpoint in IncludeRefContainer, does it get hit when you do
serializeLanguageSettings?

>
> > The refresh is kicked off by
> >
> LanguageSettingsProvidersSerializer.notifyLanguageSettingsChangeListeners(IL
> > anguageSettingsChangeEvent) which is kicked off by the below methods.
>
> This finally ends in a single listener,
> org.eclipse.cdt.internal.core.pdom.LanguageSettingsChangeListener and calls
> PDOMManager#update(). This seems to trigger re-indexing and updates the
> display of open editor views, which is fine.

Good.

> ...
> > You should be able to call this:
> >
> LanguageSettingsSerializableProvider.serializeLanguageSettingsInBackground(I
> > CConfigurationDescription) or the foreground version
> > serializeLanguageSettings.
> Yes, this updates the #if sections in the C-editor views.

And the Includes too?


> Martin
>
> --
> E-Mails sollten Text sein, Text und nur Text.
> Wenn Gott gewollt hätte, dass E-Mails in HTML geschrieben würden,
> endeten Gebete traditionell mit </amen>.
> _______________________________________________
> 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