public abstract class SyntaxHighlighterFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SyntaxHighlighterLanguageFactory |
LANGUAGE_FACTORY |
Constructor and Description |
---|
SyntaxHighlighterFactory() |
Modifier and Type | Method and Description |
---|---|
static SyntaxHighlighter |
getSyntaxHighlighter(FileType fileType,
Project project,
VirtualFile file)
Returns syntax highlighter for the given file type.
|
static SyntaxHighlighter |
getSyntaxHighlighter(Language language,
Project project,
VirtualFile file)
Returns syntax highlighter for the given language.
|
abstract SyntaxHighlighter |
getSyntaxHighlighter(Project project,
VirtualFile virtualFile)
Override this method to provide syntax highlighting (coloring) capabilities for your language implementation.
|
public static final SyntaxHighlighterLanguageFactory LANGUAGE_FACTORY
public static SyntaxHighlighter getSyntaxHighlighter(Language language, Project project, VirtualFile file)
language
- a Language
to get highlighter forproject
- might be necessary to gather various project settings fromfile
- might be necessary to collect file specific settingsSyntaxHighlighter
interface implementation for the given file typepublic static SyntaxHighlighter getSyntaxHighlighter(FileType fileType, Project project, VirtualFile file)
getSyntaxHighlighter(Language, Project, VirtualFile)
in most cases,
and use this method only when do not know the language you use.fileType
- a file type to use to select appropriate highlighterproject
- might be necessary to gather various project settings fromfile
- might be necessary to collect file specific settingsSyntaxHighlighter
interface implementation for the given file typepublic abstract SyntaxHighlighter getSyntaxHighlighter(Project project, VirtualFile virtualFile)
project
- might be necessary to gather various project settings from.virtualFile
- might be necessary to collect file specific settingsSyntaxHighlighter
interface implementation for this particular language.