public abstract class LanguageFileType extends java.lang.Object implements FileType
Language
.
Note that the associated language can still be overridden by a LanguageSubstitutor
.EMPTY_ARRAY
EDITABLE_COPY_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
LanguageFileType(Language language)
Creates a language file type for the specified language.
|
protected |
LanguageFileType(Language language,
boolean secondary)
Creates a language file type for the specified language.
|
Modifier and Type | Method and Description |
---|---|
java.nio.charset.Charset |
extractCharsetFromFileContent(Project project,
VirtualFile file,
java.lang.CharSequence content) |
java.nio.charset.Charset |
extractCharsetFromFileContent(Project project,
VirtualFile file,
java.lang.String content)
Deprecated.
Callers: use
CharsetUtil.extractCharsetFromFileContent(Project, VirtualFile, FileType, CharSequence)
Overriders: override extractCharsetFromFileContent(Project, VirtualFile, CharSequence) instead |
java.lang.String |
getCharset(VirtualFile file,
byte [] content)
Returns the character set for the specified file.
|
Language |
getLanguage()
Returns the language used in the files of the type.
|
boolean |
isBinary()
Returns
true if files of the specified type contain binary data. |
boolean |
isJVMDebuggingSupported()
Deprecated.
implement own
JavaDebugAware instead |
boolean |
isReadOnly()
Returns
true if the specified file type is read-only. |
boolean |
isSecondary()
If true, this language file type will never be returned as the associated file type for the language.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultExtension, getDescription, getIcon, getName
getDisplayName
protected LanguageFileType(Language language)
language
- The language used in the files of the type.protected LanguageFileType(Language language, boolean secondary)
language
- The language used in the files of the type.secondary
- If true, this language file type will never be returned as the associated file type for the language.
(Used when a file type is reusing the language of another file type, e.g. XML).public final Language getLanguage()
public final boolean isBinary()
FileType
true
if files of the specified type contain binary data. Used for source control, to-do items scanning and other purposes.public boolean isReadOnly()
FileType
true
if the specified file type is read-only. Read-only file types are not shown in the "File Types" settings dialog,
and users cannot change the extensions associated with the file type.isReadOnly
in interface FileType
true
if the file type is read-only, false
otherwise.public boolean isSecondary()
public java.lang.String getCharset(VirtualFile file, byte [] content)
FileType
getCharset
in interface FileType
file
- The file for which the character set is requested.content
- File content.Charset
class.@Deprecated public boolean isJVMDebuggingSupported()
JavaDebugAware
instead@Deprecated public java.nio.charset.Charset extractCharsetFromFileContent(Project project, VirtualFile file, java.lang.String content)
CharsetUtil.extractCharsetFromFileContent(Project, VirtualFile, FileType, CharSequence)
Overriders: override extractCharsetFromFileContent(Project, VirtualFile, CharSequence)
insteadpublic java.nio.charset.Charset extractCharsetFromFileContent(Project project, VirtualFile file, java.lang.CharSequence content)