本文整理汇总了Java中com.intellij.tasks.jira.jql.JqlTokenTypes类的典型用法代码示例。如果您正苦于以下问题:Java JqlTokenTypes类的具体用法?Java JqlTokenTypes怎么用?Java JqlTokenTypes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JqlTokenTypes类属于com.intellij.tasks.jira.jql包,在下文中一共展示了JqlTokenTypes类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getType
import com.intellij.tasks.jira.jql.JqlTokenTypes; //导入依赖的package包/类
@NotNull
@Override
public Type getType() {
boolean hasNot = getNode().findChildByType(JqlTokenTypes.NOT_KEYWORD) != null;
boolean hasIn = getNode().findChildByType(JqlTokenTypes.IN_KEYWORD) != null;
if (hasIn && hasNot) {
return Type.WAS_NOT_IN;
}
else if (hasIn) {
return Type.WAS_IN;
}
else if (hasNot) {
return Type.WAS_NOT;
}
else {
return Type.WAS;
}
}
示例2: addKeywordsCompletion
import com.intellij.tasks.jira.jql.JqlTokenTypes; //导入依赖的package包/类
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"));
}
示例3: isCustomField
import com.intellij.tasks.jira.jql.JqlTokenTypes; //导入依赖的package包/类
@Override
public boolean isCustomField() {
return findChildByType(JqlTokenTypes.CUSTOM_FIELD) != null;
}
示例4: isAscending
import com.intellij.tasks.jira.jql.JqlTokenTypes; //导入依赖的package包/类
@Override
public boolean isAscending() {
PsiElement order = findChildByType(JqlTokenTypes.SORT_ORDERS);
return order == null || order.getNode().getElementType() == JqlTokenTypes.ASC_KEYWORD;
}