/*
 * Copyright 2000-2009 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.openapi.fileTypes;

import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;

/**
 * Controls the syntax highlighting of a file.
 *
 * @see com.intellij.lang.Language#getSyntaxHighlighter(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile)
 * @see FileType#getHighlighter(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile) 
 */

public interface SyntaxHighlighter {
  SyntaxHighlighterProvider PROVIDER = new FileTypeExtensionFactory<SyntaxHighlighterProvider>(SyntaxHighlighterProvider.class, "com.intellij.syntaxHighlighter").get();

  /**
   * Returns the lexer used for highlighing the file. The lexer is invoked incrementally when the file is changed, so it must be
   * capable of saving/restoring state and resuming lexing from the middle of the file.
   *
   * @return The lexer implementation.
   */
  @NotNull
  Lexer getHighlightingLexer();

  /**
   * Returns the list of text attribute keys used for highlighting the specified token type. The attributes of all attribute keys
   * returned for the token type are successively merged to obtain the color and attributes of the token.
   *
   * @param tokenType The token type for which the highlighting is requested.
   * @return The array of text attribute keys.
   */
  @NotNull
  TextAttributesKey[] getTokenHighlights(IElementType tokenType);
}
@@ -20,10 +20,10 @@
 0-20
+1
 0
-9
  Jet
@@ -894,21 +894,50 @@
 lij.
-lang.Language
+openapi.fileTypes.SyntaxHighlighterFactory
 #get
@@ -983,32 +983,33 @@
 project.Project,
+ 
 com.intellij.ope
@@ -1042,32 +1042,113 @@
 see 
-FileType#getHighlighter(
+com.intellij.openapi.fileTypes.SyntaxHighlighterFactory#getSyntaxHighlighter(com.intellij.lang.Language, 
 com.
@@ -1180,16 +1180,17 @@
 Project,
+ 
 com.inte
@@ -1222,15 +1222,13 @@
 ile)
- 
 %0A */%0A
-%0A
 publ
@@ -1428,32 +1428,32 @@
 ).get();%0A%0A  /**%0A
-
    * Returns the
@@ -1476,16 +1476,17 @@
 highligh
+t
 ing the 

fix see-tags