Java Code Examples for com.intellij.openapi.fileTypes.SyntaxHighlighterBase

The following examples show how to use com.intellij.openapi.fileTypes.SyntaxHighlighterBase. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: consulo   Source File: LayeredLexerEditorHighlighter.java    License: Apache License 2.0 5 votes vote down vote up
@Nonnull
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;
}
 
Example 2
Source Project: JetBrains-NASM-Language   Source File: NASMSyntaxHighlighter.java    License: MIT License 4 votes vote down vote up
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    return SyntaxHighlighterBase.pack(AttributeKeys.get(tokenType));
}
 
Example 3
Source Project: netbeans-mmd-plugin   Source File: MMHighlighter.java    License: Apache License 2.0 4 votes vote down vote up
@Nonnull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
  return SyntaxHighlighterBase.pack(keys1.get(tokenType), keys2.get(tokenType));
}