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

I've tried this and when you re-enable the indexer it throws out the
cached index does a full reindex of the entire project.  While
disabled the indexer misses out on refresh notifications, but is there
any way to have it do something more lightweight?

Thanks,
Terry

On Thu, Aug 14, 2008 at 12:25 PM,  <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
>


Back to the top