当前位置: 首页>>代码示例>>Java>>正文


Java IElementType.equals方法代码示例

本文整理汇总了Java中com.intellij.psi.tree.IElementType.equals方法的典型用法代码示例。如果您正苦于以下问题:Java IElementType.equals方法的具体用法?Java IElementType.equals怎么用?Java IElementType.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.psi.tree.IElementType的用法示例。


在下文中一共展示了IElementType.equals方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
	if (tokenType.equals(CptTypes.SEPARATOR) || tokenType.equals(CptTypes.MAP)) {
		return SEPARATOR_KEYS;
	} else if (tokenType.equals(CptTypes.TEMPLATE_NAME)) {
		return TEMPLATE_NAME_KEYS;
	} else if (tokenType.equals(CptTypes.CLASS_NAME)) {
		return CLASS_NAME_KEYS;
	} else if (tokenType.equals(CptTypes.TEMPLATE_DESCRIPTION)) {
		return TEMPLATE_DESCRIPTION_KEYS;
	} else if (tokenType.equals(CptTypes.TEMPLATE_CODE)) {
		return TEMPLATE_CODE_KEYS;
	} else if (TEMPLATE_VARIABLE_PARTS.contains(tokenType)) {
		return TEMPLATE_VARIABLE_KEYS;
	} else if (tokenType.equals(CptTypes.TEMPLATE_ESCAPE)) {
		return TEMPLATE_ESCAPE_KEYS;
	} else if (tokenType.equals(CptTypes.COMMENT)) {
		return COMMENT_KEYS;
	} else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
		return BAD_CHAR_KEYS;
	} else {
		return EMPTY_KEYS;
	}
}
 
开发者ID:xylo,项目名称:intellij-postfix-templates,代码行数:26,代码来源:CptSyntaxHighlighter.java

示例2: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    if (tokenType.equals(CrystalTypes.SEPARATOR)) {
        return SEPARATOR_KEYS;
    } else if (tokenType.equals(CrystalTypes.KEY)) {
        return KEY_KEYS;
    } else if (tokenType.equals(CrystalTypes.VALUE)) {
        return VALUE_KEYS;
    } else if (tokenType.equals(CrystalTypes.COMMENT)) {
        return COMMENT_KEYS;
    } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHAR_KEYS;
    } else {
        return EMPTY_KEYS;
    }
}
 
开发者ID:benoist,项目名称:intellij-crystal,代码行数:18,代码来源:CrystalSyntaxHighlighter.java

示例3: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    if (tokenType.equals(CapnpTypes.SEPARATOR)) {
        return SEPARATOR_KEYS;

    } else if (tokenType.equals(CapnpTypes.IDENTIFIER)){
        return IDENTIFIER_KEYS;
    } else if (tokenType.equals(CapnpTypes.KEYWORD)) {
        return KEY_KEYS;
    } else if (tokenType.equals(CapnpTypes.TYPE)) {
        return TYPE_KEYS;
    } else if (tokenType.equals(CapnpTypes.COMMENT)) {
        return COMMENT_KEYS;
    } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHAR_KEYS;
    } else {
        return EMPTY_KEYS;
    }
}
 
开发者ID:xmonader,项目名称:sercapnp,代码行数:21,代码来源:CapnpSyntaxHighlighter.java

示例4: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    if (tokenType.equals(CsvTypes.COMMA)) {
        return COMMA_KEYS;
    } else if (tokenType.equals(CsvTypes.QUOTE)) {
        return QUOTE_KEYS;
    } else if (tokenType.equals(CsvTypes.TEXT)) {
        return TEXT_KEYS;
    } else if (tokenType.equals(CsvTypes.ESCAPED_TEXT)) {
        return ESCAPED_TEXT_KEYS;
    } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHAR_KEYS;
    } else {
        return EMPTY_KEYS;
    }
}
 
开发者ID:SeeSharpSoft,项目名称:intellij-csv-validator,代码行数:18,代码来源:CsvSyntaxHighlighter.java

示例5: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public final TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    /* Entities OPERATIONS */
    if (KEYWORD_SET.contains(tokenType)) {
        return KEYWORD_KEYS;
    }
    if (SEPARATOR_SET.contains(tokenType)) {
        return SEPARATOR_KEYS;
    }
    /* Basic elem */

    if (tokenType.equals(GCMTypes.ANNOTATION)) {
        return ANNOTATION_KEYS;
    }
    if (tokenType.equals(GCMTypes.IDENT)) {
        return IDENT_KEYS;
    }
    if (tokenType.equals(GCMTypes.NUMBER)) {
        return NUMBER_KEYS;
    }
    if (tokenType.equals(GCMTypes.LINE_COMMENT) | tokenType.equals(GCMTypes.BLOCK_COMMENT)) {
        return COMMENT_KEYS;
    }
    if (tokenType.equals(GCMTypes.STRING)) {
        return STRING_KEYS;
    }
    if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHAR_KEYS;
    }
    return EMPTY_KEYS;

}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:34,代码来源:GCMSyntaxHighlighter.java

示例6: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    if (KEYWORD_TOKEN_SET.contains(tokenType)) {
        return KEYWORD_KEYS;
    } else if (tokenType.equals(FlexibleSearchTypes.STRING)) {
        return STRING_KEYS;
    } else if (SYMBOL_TOKEN_SET.contains(tokenType)) {
        return SYMBOL_KEYS;
    } else if (COLUMN_TOKEN_SET.contains(tokenType)) {
        return COLUMN_KEYS;
    } else if (TABLE_NAME_TOKEN_SET.contains(tokenType)) {
        return TABLE_KEYS;
    } else if (BRACES_TOKEN_SET.contains(tokenType)) {
        return BRACES_KEYS;
    } else if (BRACKETS_TOKEN_SET.contains(tokenType)) {
        return BRACKETS_KEYS;
    } else if (PARENTHESES_TOKEN_SET.contains(tokenType)) {
        return PARENTHESES_KEYS;
    } else if (tokenType.equals(FlexibleSearchTypes.NUMBER)) {
        return NUMBER_KEYS;
    } else if (tokenType.equals(FlexibleSearchParserDefinition.COMMENT)) {
        return COMMENT_KEYS;
    } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHARACTER_KEYS;
    } else {
        return EMPTY_KEYS;
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:30,代码来源:FlexibleSearchSyntaxHighlighter.java

示例7: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType iElementType) {
    if (iElementType.equals(OneScriptTypes.COMMENT)) {
        return COMMENT_KEYS;
    } else if (iElementType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHAR_KEYS;
    } else if (iElementType.equals(OneScriptTypes.STRING)
            || iElementType.equals(OneScriptTypes.STRINGSTART)
            || iElementType.equals(OneScriptTypes.STRINGPART)
            || iElementType.equals(OneScriptTypes.STRINGTAIL)) {
        return STRING_KEYS;
    } else if (iElementType.equals(OneScriptTypes.DATETIME)) {
        return DATETIME_KEYS;
    } else if (iElementType.equals(OneScriptTypes.COMPILER_DIRECTIVE)) {
        return COMPILER_DIRECTIVE_KEYS;
    } else if (iElementType.equals(OneScriptTypes.USING)) {
        return USING_DIRECTIVE_KEYS;
    } else if (iElementType.equals(OneScriptTypes.PREPROCESSOR)) {
        return PREPROCESSOR_DIRECTIVE_KEYS;
    } else if (iElementType.equals(OneScriptTypes.BOOLEAN_TRUE)
            || iElementType.equals(OneScriptTypes.BOOLEAN_FALSE)
            || iElementType.equals(OneScriptTypes.UNDEFINED)
            || iElementType.equals(OneScriptTypes.NULL)) {
        return LITERAL_CONSTANT_KEYS;
    } else if (iElementType.toString().endsWith("_KEYWORD")) {
        return KEYWORD_KEYS;
    } else {
        return new TextAttributesKey[0];
    }
}
 
开发者ID:dmpas,项目名称:idea-onescript,代码行数:32,代码来源:OneScriptSyntaxHighlighter.java

示例8: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    if (tokenType.equals(m_types.COMMENT)) {
        return COMMENT_KEYS;
    } else if (tokenType.equals(m_types.LBRACE) || tokenType.equals(m_types.RBRACE)) {
        return BRACE_KEYS;
    } else if (tokenType.equals(m_types.LBRACKET) || tokenType.equals(m_types.RBRACKET) || tokenType.equals(m_types.LARRAY) || tokenType.equals(m_types.RARRAY)) {
        return BRACKET_KEYS;
    } else if (tokenType.equals(m_types.LPAREN) || tokenType.equals(m_types.RPAREN)) {
        return PAREN_KEYS;
    } else if (tokenType.equals(m_types.INT) || tokenType.equals(m_types.FLOAT)) {
        return NUMBER_KEYS;
    } else if (m_types.DOT.equals(tokenType)) {
        return DOT_KEYS;
    } else if (m_types.TYPE_ARGUMENT.equals(tokenType)) {
        return TYPE_ARGUMENT_KEYS;
    } else if (m_types.POLY_VARIANT.equals(tokenType)) {
        return POLY_VARIANT_KEYS;
    } else if (m_types.COMMA.equals(tokenType)) {
        return COMMA_KEYS;
    } else if (m_types.SEMI.equals(tokenType)) {
        return SEMICOLON_KEYS;
    } else if (m_types.STRING.equals(tokenType) || m_types.CHAR.equals(tokenType)) {
        return STRING_KEYS;
    } else if (BAD_CHARACTER.equals(tokenType)) {
        return BAD_CHAR_KEYS;
    } else if (m_types == RmlTypes.INSTANCE) {
        if (RML_KEYWORD_TYPES.contains(tokenType)) {
            return KEYWORD_KEYS;
        } else if (RML_OPERATION_SIGN_TYPES.contains(tokenType)) {
            return OPERATION_SIGN_KEYS;
        } else if (RML_OPTIONS_TYPES.contains(tokenType)) {
            return OPTION_KEYS;
        }
    } else if (m_types == OclTypes.INSTANCE) {
        if (OCL_KEYWORD_TYPES.contains(tokenType)) {
            return KEYWORD_KEYS;
        } else if (OCL_OPERATION_SIGN_TYPES.contains(tokenType)) {
            return OPERATION_SIGN_KEYS;
        } else if (OCL_OPTIONS_TYPES.contains(tokenType)) {
            return OPTION_KEYS;
        }
    }

    return EMPTY_KEYS;
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:48,代码来源:MlSyntaxHighlighter.java

示例9: getTokenHighlights

import com.intellij.psi.tree.IElementType; //导入方法依赖的package包/类
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(@NotNull final IElementType tokenType) {
    if (tokenType.equals(ImpexTypes.ALTERNATIVE_MAP_DELIMITER)) {
        return ALTERNATIVE_MAP_DELIMITER_KEYS;
    } else if (tokenType.equals(ImpexTypes.DEFAULT_KEY_VALUE_DELIMITER)) {
        return DEFAULT_KEY_VALUE_DELIMITER_KEYS;
    } else if (tokenType.equals(ImpexTypes.ASSIGN_VALUE)) {
        return ASSIGN_VALUE_KEYS;
    } else if (tokenType.equals(ImpexTypes.ATTRIBUTE_NAME)) {
        return ATTRIBUTE_NAME_KEYS;
    } else if (tokenType.equals(ImpexTypes.ATTRIBUTE_SEPARATOR)) {
        return ATTRIBUTE_SEPARATOR_KEYS;
    } else if (tokenType.equals(ImpexTypes.ATTRIBUTE_VALUE)) {
        return ATTRIBUTE_VALUE_KEYS;
    } else if (tokenType.equals(ImpexTypes.BEAN_SHELL_BODY)) {
        return BEAN_SHELL_BODY_KEYS;
    } else if (tokenType.equals(ImpexTypes.BEAN_SHELL_MARKER)) {
        return BEAN_SHELL_MARKER_KEYS;
    } else if (tokenType.equals(ImpexTypes.BOOLEAN)) {
        return BOOLEAN_KEYS;
    } else if (tokenType.equals(ImpexTypes.COMMA)) {
        return COMMA_KEYS;
    } else if (tokenType.equals(ImpexTypes.COMMENT_BODY)) {
        return COMMENT_BODY_KEYS;
    } else if (tokenType.equals(ImpexTypes.COMMENT_MARKER)) {
        return COMMENT_MARKER_KEYS;
    } else if (tokenType.equals(ImpexTypes.DEFAULT_PATH_DELIMITER)) {
        return DEFAULT_PATH_DELIMITER_KEYS;
    } else if (tokenType.equals(ImpexTypes.DIGIT)) {
        return DIGIT_KEYS;
    } else if (tokenType.equals(ImpexTypes.DOUBLE_STRING)) {
        return DOUBLE_STRING_KEYS;
    } else if (tokenType.equals(ImpexTypes.FIELD_LIST_ITEM_SEPARATOR)) {
        return FIELD_LIST_ITEM_SEPARATOR_KEYS;
    } else if (tokenType.equals(ImpexTypes.FIELD_VALUE)) {
        return FIELD_VALUE_KEYS;
    } else if (tokenType.equals(ImpexTypes.FIELD_VALUE_IGNORE)) {
        return FIELD_VALUE_IGNORE_KEYS;
    } else if (tokenType.equals(ImpexTypes.FIELD_VALUE_SEPARATOR)) {
        return FIELD_VALUE_SEPARATOR_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_MODE_INSERT)) {
        return HEADER_MODE_INSERT_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_MODE_INSERT_UPDATE)) {
        return HEADER_MODE_INSERT_UPDATE_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_MODE_REMOVE)) {
        return HEADER_MODE_REMOVE_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_MODE_UPDATE)) {
        return HEADER_MODE_UPDATE_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_PARAMETER_NAME)) {
        return HEADER_PARAMETER_NAME_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_SPECIAL_PARAMETER_NAME)) {
        return HEADER_SPECIAL_PARAMETER_NAME_KEYS;
    } else if (tokenType.equals(ImpexTypes.HEADER_TYPE)) {
        return HEADER_TYPE_KEYS;
    } else if (tokenType.equals(ImpexTypes.MACRO_NAME_DECLARATION)) {
        return MACRO_NAME_DECLARATION_KEYS;
    } else if (tokenType.equals(ImpexTypes.MACRO_USAGE)) {
        return MACRO_USAGE_KEYS;
    } else if (tokenType.equals(ImpexTypes.MACRO_VALUE)) {
        return MACRO_VALUE_KEYS;
    } else if (tokenType.equals(ImpexTypes.PARAMETERS_SEPARATOR)) {
        return PARAMETERS_SEPARATOR_KEYS;
    } else if (tokenType.equals(ImpexTypes.LEFT_ROUND_BRACKET) || tokenType.equals(ImpexTypes.RIGHT_ROUND_BRACKET)) {
        return ROUND_BRACKETS_KEYS;
    } else if (tokenType.equals(ImpexTypes.SINGLE_STRING)) {
        return SINGLE_STRING_KEYS;
    } else if (tokenType.equals(ImpexTypes.LEFT_SQUARE_BRACKET) || tokenType.equals(ImpexTypes.RIGHT_SQUARE_BRACKET)) {
        return SQUARE_BRACKETS_KEYS;
    } else if (tokenType.equals(ImpexTypes.VALUE_SUBTYPE)) {
        return VALUE_SUBTYPE_KEYS;
    } else if (tokenType.equals(ImpexTypes.ALTERNATIVE_PATTERN)) {
        return ALTERNATIVE_PATTERN_KEYS;
    } else if (tokenType.equals(ImpexTypes.DOCUMENT_ID)) {
        return DOCUMENT_ID_KEYS;
    } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
        return BAD_CHARACTER_KEYS;
    } else {
        return EMPTY_KEYS;
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:82,代码来源:DefaultImpexSyntaxHighlighter.java


注:本文中的com.intellij.psi.tree.IElementType.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。