ensure that highlighted identifier is removed when option is turned off (IDEADEV...
[fedora-idea.git] / lang-impl / src / com / intellij / codeInsight / daemon / impl / IdentifierHighlighterPassFactory.java
bloba9f8dc6d9969caf1faf65c41ad37f2c24fde6a91
1 package com.intellij.codeInsight.daemon.impl;
3 import com.intellij.codeHighlighting.Pass;
4 import com.intellij.codeHighlighting.TextEditorHighlightingPass;
5 import com.intellij.codeHighlighting.TextEditorHighlightingPassFactory;
6 import com.intellij.codeHighlighting.TextEditorHighlightingPassRegistrar;
7 import com.intellij.openapi.components.AbstractProjectComponent;
8 import com.intellij.openapi.editor.Editor;
9 import com.intellij.openapi.project.Project;
10 import com.intellij.psi.PsiFile;
11 import org.jetbrains.annotations.NotNull;
13 /**
14 * @author yole
16 public class IdentifierHighlighterPassFactory extends AbstractProjectComponent implements TextEditorHighlightingPassFactory {
17 public IdentifierHighlighterPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) {
18 super(project);
19 highlightingPassRegistrar.registerTextEditorHighlightingPass(this, new int[]{
20 Pass.UPDATE_VISIBLE
21 }, null, false, -1);
24 public TextEditorHighlightingPass createHighlightingPass(@NotNull final PsiFile file, @NotNull final Editor editor) {
25 return new IdentifierHighlighterPass(file.getProject(), file, editor);