JqlFieldType (PsiElement element) { JqlTerminalClause clause = PsiTreeUtil.getParentOfType(element, JqlTerminalClause.class); if (clause != null) { return JqlStandardField.typeOf(clause.getFieldName()); } return JqlFieldType.UNKNOWN; }