EA-27034 null completion process during completion

This commit is contained in:
peter
2011-04-18 16:24:47 +02:00
parent 5a4644b159
commit 3098a65b9a
@@ -85,7 +85,9 @@ public class CompletionServiceImpl extends CompletionService{
final String prefix = CompletionData.findPrefixStatic(position, parameters.getOffset());
final String textBeforePosition = parameters.getPosition().getContainingFile().getText().substring(0, parameters.getOffset());
CompletionProgressIndicator process = myCurrentCompletion;
LOG.assertTrue(process != null, "createResultSet may be invoked only during completion");
if (process == null) {
throw new AssertionError("createResultSet may be invoked only during completion: " + ourPhase + "; set at " + ourPhaseTrace);
}
CamelHumpMatcher matcher = new CamelHumpMatcher(prefix, true, parameters.relaxMatching());
CompletionSorterImpl sorter = defaultSorter(parameters, matcher);
return new CompletionResultSetImpl(consumer, textBeforePosition, matcher, contributor,parameters, sorter, process, null);