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

项目:intellij-ce-playground    文件:GroovyFileType.java   
private GroovyFileType() {
  super(GroovyLanguage.INSTANCE);
  FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider() {
    @Override
    public EditorHighlighter getEditorHighlighter(@Nullable Project project,
                                                  @NotNull FileType fileType, @Nullable VirtualFile virtualFile,
                                                  @NotNull EditorColorsScheme colors) {
      return new GroovyEditorHighlighter(colors);
    }
  });
  GROOVY_FILE_TYPES.add(this);
}
项目:tools-idea    文件:GroovyFileType.java   
private GroovyFileType() {
  super(new GroovyLanguage());
  FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider() {
    @Override
    public EditorHighlighter getEditorHighlighter(@Nullable Project project,
                                                  @NotNull FileType fileType, @Nullable VirtualFile virtualFile,
                                                  @NotNull EditorColorsScheme colors) {
      return new GroovyEditorHighlighter(colors);
    }
  });
}
项目:intellij-latte    文件:LatteFileType.java   
private LatteFileType() {
    super(LatteLanguage.INSTANCE);

    FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider() {
        public EditorHighlighter getEditorHighlighter(@Nullable Project project, @NotNull FileType fileType, @Nullable VirtualFile virtualFile, @NotNull EditorColorsScheme colors) {
            return new LatteEditorHighlighter(project, virtualFile,colors);
        }
    });
}
项目:consulo-apache-velocity    文件:VtlFileType.java   
private VtlFileType()
{
    super(VtlLanguage.INSTANCE);

    FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider()
    {
        @Override
        public EditorHighlighter getEditorHighlighter(@Nullable Project project, @NotNull FileType fileType, @Nullable VirtualFile virtualFile, @NotNull EditorColorsScheme colors)
        {
            return new VtlEditorHighlighter(project, virtualFile, colors);
        }
    });
}
项目:Intellij-Dust    文件:DustFileType.java   
private DustFileType() {
  super(DustLanguage.INSTANCE);
  // register highlighter - lazy singleton factory
  FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider() {
    public EditorHighlighter getEditorHighlighter(@Nullable Project project,
                                                  @NotNull FileType fileType,
                                                  @Nullable VirtualFile virtualFile,
                                                  @NotNull EditorColorsScheme editorColorsScheme) {
      return new DustLayeredSyntaxHighlighter(project, virtualFile, editorColorsScheme);
    }
  });
}