Java 类com.intellij.openapi.fileTypes.SyntaxHighlighterBase 实例源码

项目:pycharm-pyxl    文件:PyxlHighlighter.java   
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    TextAttributesKey[] defaultTextAttributeKeys, extendedHighlighterKeys;

    defaultTextAttributeKeys = super.getTokenHighlights(tokenType);
    extendedHighlighterKeys = SyntaxHighlighterBase.pack(keys1.get(tokenType), keys2.get(tokenType));

    int numKeys = defaultTextAttributeKeys.length + extendedHighlighterKeys.length;
    TextAttributesKey[] merged = new TextAttributesKey[numKeys];

    System.arraycopy(defaultTextAttributeKeys, 0, merged, 0, defaultTextAttributeKeys.length);
    System.arraycopy(extendedHighlighterKeys,
            0, merged,
            defaultTextAttributeKeys.length,
            extendedHighlighterKeys.length);

    return merged;
}
项目:intellij-ce-playground    文件:LayeredLexerEditorHighlighter.java   
public TextAttributes getAttributes(IElementType tokenType) {
  TextAttributes attrs = myAttributesMap.get(tokenType);
  if (attrs == null) {
    attrs = convertAttributes(SyntaxHighlighterBase.pack(myBackground, mySyntaxHighlighter.getTokenHighlights(tokenType)));
    myAttributesMap.put(tokenType, attrs);
  }
  return attrs;
}
项目:tools-idea    文件:LayeredLexerEditorHighlighter.java   
public TextAttributes getAttributes(IElementType tokenType) {
  TextAttributes attrs = myAttributesMap.get(tokenType);
  if (attrs == null) {
    attrs = convertAttributes(SyntaxHighlighterBase.pack(myBackground, mySyntaxHighlighter.getTokenHighlights(tokenType)));
    myAttributesMap.put(tokenType, attrs);
  }
  return attrs;
}
项目:consulo    文件:LayeredLexerEditorHighlighter.java   
public TextAttributes getAttributes(IElementType tokenType) {
  TextAttributes attrs = myAttributesMap.get(tokenType);
  if (attrs == null) {
    attrs = convertAttributes(SyntaxHighlighterBase.pack(myBackground, mySyntaxHighlighter.getTokenHighlights(tokenType)));
    myAttributesMap.put(tokenType, attrs);
  }
  return attrs;
}
项目:RtplPlugin    文件:RtplSyntaxHighlighter.java   
@Override
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    return SyntaxHighlighterBase.pack(XmlHighlighterColors.HTML_CODE, keys1.get(tokenType));
}
项目:intellij-ce-playground    文件:RestSyntaxHighlighter.java   
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(ATTRIBUTES.get(tokenType));
}
项目:intellij-ce-playground    文件:BuildoutCfgSyntaxHighlighter.java   
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(ATTRIBUTES.get(tokenType));
}
项目:intellij-ce-playground    文件:HtmlFileHighlighter.java   
@Override
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(XmlHighlighterColors.HTML_CODE, pack(keys1.get(tokenType), keys2.get(tokenType)));
}
项目:intellij-ce-playground    文件:PropertiesHighlighter.java   
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(keys1.get(tokenType), keys2.get(tokenType));
}
项目:netbeans-mmd-plugin    文件:MMHighlighter.java   
@Nonnull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(keys1.get(tokenType), keys2.get(tokenType));
}
项目:CMaker    文件:CMakeHighlighter.java   
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType iElementType) {
    return SyntaxHighlighterBase.pack(keys1.get(iElementType), keys2.get(iElementType));
}
项目:consulo-xml    文件:HtmlFileHighlighter.java   
@Override
@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType)
{
    return SyntaxHighlighterBase.pack(XmlHighlighterColors.HTML_CODE, pack(keys1.get(tokenType), keys2.get(tokenType)));
}
项目:consulo-apache-velocity    文件:VtlSyntaxHighlighter.java   
@NotNull
public TextAttributesKey[] getTokenHighlights(final IElementType tokenType)
{
    return SyntaxHighlighterBase.pack(ourMap.get(tokenType), VELOCITY_SCRIPTING_BACKGROUND);
}