Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] C++ Indexer not getting updated on programmatic additions to a C++ file


I can see that a update to the C++ indexer gets automatically triggered when any change is done to a C++ file and saved. I don't see this behavior when a org.eclipse.ltk.core.refactoring.CompositeChange object is used to create file changes on the C++ file and then a perform() call is fired on the change.

Specifically speaking, if I want to insert a new field to the C++ class programmatically using the CompositeChange object, I construct a change object with the InsertEdit changes and fire a perform call on the change.
I can see a delta fired for the new field addition by the CModelManager with the delta looking like -

 CMODEL [*]: {CHILDREN | FINE GRAINED}
        IndexerTest CPROJECT [*]: {CHILDREN | FINE GRAINED}
                IndexerTest SOURCE_ROOT [*]: {CHILDREN | FINE GRAINED}
                        C1.h TRANSLATION_UNIT [*]: {CHILDREN | FINE GRAINED}
                                C1 C_CLASS [*]: {CHILDREN}
                                        ival C_FIELD [+]: {}

I can also see that the new field is inserted into the file successfully and a build automatically triggered on the project. But strangely, this does not trigger an update on the index.

Isn't this a defect?

regards,
pavan

Back to the top