1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

bug 48308 - don't block the content assist while waiting for indexing,

force the search to happen on the partial index
This commit is contained in:
Andrew Niefer 2004-06-14 14:39:52 +00:00
parent 7996df4a59
commit 41db303fbf
2 changed files with 16 additions and 1 deletions

View file

@ -53,6 +53,7 @@ public class SearchEngine implements ICSearchConstants{
* compilation units.
*/
private IWorkingCopy[] workingCopies = null;
private int waitingPolicy = ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH;
/**
*
@ -66,6 +67,19 @@ public class SearchEngine implements ICSearchConstants{
this.workingCopies = workingCopies;
}
/**
* Policy is one of ICSearchConstants.FORCE_IMMEDIATE_SEARCH, ICSearchConstants.CANCEL_IF_NOT_READY_TO_SEARCH
* or ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH
* @param policy
*/
public void setWaitingPolicy( int policy ){
if( policy == FORCE_IMMEDIATE_SEARCH ||
policy == CANCEL_IF_NOT_READY_TO_SEARCH ||
policy == WAIT_UNTIL_READY_TO_SEARCH )
{
waitingPolicy = policy;
}
}
/**
* @return
*/
@ -193,7 +207,7 @@ public class SearchEngine implements ICSearchConstants{
pathCollector,
indexManager
),
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
waitingPolicy,
subMonitor,
null );

View file

@ -133,6 +133,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
resultCollector = new ResultCollector();
completionEngine = new CompletionEngine(resultCollector);
searchEngine = new SearchEngine();
searchEngine.setWaitingPolicy( ICSearchConstants.FORCE_IMMEDIATE_SEARCH );
setupTemplateEngine();
fRestrictToMatchingCase = false;