Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Waiting until indexer is finished

Hi,

The indexer itself does not really know whether the index is up to date or not. However, at a given point in time, you can find out whether the indexer has any plans to update an index:

·         CCorePlugin.getIndexManager().isIndexerSetupPostponed(P) indicates, that indexing for a given project has not yet been initialized. The initialization yet to be done may trigger indexing tasks.

·          CCorePlugin.getIndexManager().isIndexerIdle() indicates, that the indexer has scheduled work for at least one of the projects, for which indexing has been initialized.

 

You can use an IndexerSetupParticipant to influence when the setup occurs and also to get a notification, when the setup is actually performed.

You can use CCorePlugin.getIndexManager().joinIndexer(…) to wait until the indexer becomes idle.

 

Markus.

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jesper Eskilson
Sent: Thursday, January 19, 2012 09:58
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Waiting until indexer is finished

 

Hi,

I have a test case which creates a CDT project programmatically. After the project has been created, I want to be able to access the index for that project. What is the correct way to wait until the index is up-to-date for that specific project?

--

Jesper Eskilson Development Engineer
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Phone: +46 18 16 78 00
E-mail: jesper.eskilson@xxxxxxx Website: www.iar.com
Twitter: www.twitter.com/iarsystems


Back to the top