private void addKeywordsCompletion() {
    extend(CompletionType.BASIC,
           AFTER_ANY_CLAUSE,
           new JqlKeywordCompletionProvider("and", "or", "order by"));
    extend(CompletionType.BASIC,
           AFTER_CLAUSE_WITH_HISTORY_PREDICATE,
           new JqlKeywordCompletionProvider("on", "before", "after", "during", "from", "to", "by"));
    extend(CompletionType.BASIC,
           AFTER_FIELD_IN_CLAUSE,
           new JqlKeywordCompletionProvider("was", "in", "not", "is", "changed"));
    extend(CompletionType.BASIC,
           psiElement().andOr(
             BEGINNING_OF_CLAUSE,
             psiElement().inside(JqlTerminalClause.class).andOr(
               psiElement().afterLeaf(psiElement(JqlTokenTypes.WAS_KEYWORD)),
               psiElement().afterLeaf(psiElement(JqlTokenTypes.IS_KEYWORD)))),
           new JqlKeywordCompletionProvider("not"));
    extend(CompletionType.BASIC,
           psiElement().afterLeaf(
             psiElement().andOr(
               psiElement(JqlTokenTypes.NOT_KEYWORD).
                 andNot(psiElement().afterLeaf(
                   psiElement(JqlTokenTypes.IS_KEYWORD))).
                 andNot(psiElement().withParent(JqlNotClause.class)),
               psiElement(JqlTokenTypes.WAS_KEYWORD))),
           new JqlKeywordCompletionProvider("in"));
    extend(CompletionType.BASIC,
           AFTER_ORDER_KEYWORD,
           new JqlKeywordCompletionProvider("by"));
    extend(CompletionType.BASIC,
           AFTER_FIELD_IN_SORT_KEY,
           new JqlKeywordCompletionProvider("asc", "desc"));
  }
private void addKeywordsCompletion()