當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。