com.intellij.openapi.fileTypes.SyntaxHighlighterBase Java Examples

The following examples show how to use com.intellij.openapi.fileTypes.SyntaxHighlighterBase. 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 File: LayeredLexerEditorHighlighter.java    From consulo with 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 File: NASMSyntaxHighlighter.java    From JetBrains-NASM-Language with MIT License 4 votes vote down vote up
@NotNull
@Override
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
    return SyntaxHighlighterBase.pack(AttributeKeys.get(tokenType));
}
 
Example #3
Source File: MMHighlighter.java    From netbeans-mmd-plugin with 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));
}