Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] temporarily switch off indexer programmatically

Warren,

Thanks for the code - I have it working.

However, a supplementary question:

I am creating several projects in a wizard (with the ID_NO_INDEXER selected) and on completion want to index all of the projects. Do I need to run around each project, setting the IndexerId for each of them? I guess if I create them while the default is set to ID_NO_INDEXER, then I will need to.

Thanks

Warren.Paul@xxxxxxxxx wrote:
Something like this:

		// remember the indexer setting
		String defaultIndexerId =
CCorePlugin.getIndexManager().getDefaultIndexerId();
		try {
	
CCorePlugin.getIndexManager().setDefaultIndexerId(IPDOMManager.ID_NO_IND
EXER);

			// whatever you need to do here
		} finally {
			// restore the default indexer
	
CCorePlugin.getIndexManager().setDefaultIndexerId(defaultIndexerId);

			// and now set the indexer for the project which
starts the indexing
	
CCorePlugin.getIndexManager().setIndexerId(cProject, defaultIndexerId);
		}


Thanks,
Warren
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of ext Subs
Sent: Thursday, August 14, 2008 10:45 AM
To: CDT General developers list.
Subject: [cdt-dev] temporarily switch off indexer programmatically

Hi,

I've written a wizard that creates some C projects and imports resources
into them. I'd like to disable the indexer while the wizard is running
and restore its original state when the wizard completes.

I've had a look around but can't find a way to do this. Any clues?

Thanks,

--
Subs
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



--
Subs


Back to the top