diff --git a/platform/lang-api/src/com/intellij/codeInsight/completion/CompletionResultSet.java b/platform/lang-api/src/com/intellij/codeInsight/completion/CompletionResultSet.java index 02a56d2d6c9e..5b89f134db97 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/completion/CompletionResultSet.java +++ b/platform/lang-api/src/com/intellij/codeInsight/completion/CompletionResultSet.java @@ -132,11 +132,27 @@ public abstract class CompletionResultSet implements Consumer { myCompletionService.getVariantsFromContributors(parameters, myContributor, consumer); } + /** + * Request that the completion contributors be run again when the user changes the prefix so that it becomes equal to the one given. + */ public void restartCompletionOnPrefixChange(String prefix) { restartCompletionOnPrefixChange(StandardPatterns.string().equalTo(prefix)); } + /** + * Request that the completion contributors be run again when the user changes the prefix in a way satisfied by the given condition. + */ public abstract void restartCompletionOnPrefixChange(ElementPattern prefixCondition); + /** + * Request that the completion contributors be run again when the user changes the prefix in any way. + */ + public void restartCompletionOnAnyPrefixChange() { + restartCompletionOnPrefixChange(StandardPatterns.string()); + } + + /** + * Request that the completion contributors be run again when the user types something into the editor so that no existing lookup elements match that prefix anymore. + */ public abstract void restartCompletionWhenNothingMatches(); }