public abstract class FileTypeManager extends FileTypeRegistry
FileType
instances.FileTypeRegistry.FileTypeDetector
Modifier and Type | Field and Description |
---|---|
static Topic<FileTypeListener> |
TOPIC |
ourInstanceGetter
Constructor and Description |
---|
FileTypeManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addFileTypeListener(FileTypeListener listener)
Deprecated.
Subscribe to
TOPIC on any message bus level instead. |
abstract void |
associate(FileType type,
FileNameMatcher matcher) |
void |
associateExtension(FileType type,
java.lang.String extension)
Adds an extension to the list of extensions associated with a file type.
|
void |
associatePattern(FileType type,
java.lang.String pattern) |
abstract java.lang.String [] |
getAssociatedExtensions(FileType type)
Deprecated.
since more generic way of associations using wildcards exist, not every association matches extension paradigm
|
abstract java.util.List<FileNameMatcher> |
getAssociations(FileType type) |
abstract java.lang.String |
getIgnoredFilesList()
Returns the semicolon-delimited list of patterns for files and folders
which are excluded from the project structure though they may be present
physically on disk.
|
static FileTypeManager |
getInstance()
Returns the singleton instance of the FileTypeManager component.
|
FileType |
getKnownFileTypeOrAssociate(VirtualFile file)
Deprecated.
|
abstract FileType |
getKnownFileTypeOrAssociate(VirtualFile file,
Project project) |
abstract FileType |
getStdFileType(java.lang.String fileTypeName) |
abstract boolean |
isFileIgnored(java.lang.String name)
Checks if the specified file is ignored by the IDE.
|
static FileNameMatcher |
parseFromString(java.lang.String pattern) |
abstract void |
registerFileType(FileType type,
java.util.List<? extends FileNameMatcher> defaultAssociations)
Deprecated.
use
com.intellij.fileType extension point or FileTypeFactory instead |
void |
registerFileType(FileType type,
java.lang.String... defaultAssociatedExtensions)
Deprecated.
use
com.intellij.fileType extension point or FileTypeFactory instead |
void |
removeAssociatedExtension(FileType type,
java.lang.String extension)
Removes an extension from the list of extensions associated with a file type.
|
abstract void |
removeAssociation(FileType type,
FileNameMatcher matcher) |
abstract void |
removeFileTypeListener(FileTypeListener listener)
Deprecated.
Subscribe to
TOPIC on any message bus level instead. |
abstract void |
setIgnoredFilesList(java.lang.String list)
Sets new list of semicolon-delimited patterns for files and folders which
are excluded from the project structure.
|
findFileTypeByLanguage, findFileTypeByName, getFileTypeByExtension, getFileTypeByFile, getFileTypeByFile, getFileTypeByFileName, getFileTypeByFileName, getRegisteredFileTypes, isFileIgnored, isFileOfType
public static final Topic<FileTypeListener> TOPIC
public static FileTypeManager getInstance()
@Deprecated public abstract void registerFileType(FileType type, java.util.List<? extends FileNameMatcher> defaultAssociations)
com.intellij.fileType
extension point or FileTypeFactory
instead@Deprecated public final void registerFileType(FileType type, java.lang.String... defaultAssociatedExtensions)
com.intellij.fileType
extension point or FileTypeFactory
insteadtype
- The file type to register.defaultAssociatedExtensions
- The list of extensions which cause the file to be
treated as the specified file type. The extensions should not start with '.'.public abstract boolean isFileIgnored(java.lang.String name)
name
- The name of the file to check.true
if the file is ignored, false
otherwise.@Deprecated public abstract java.lang.String [] getAssociatedExtensions(FileType type)
type
- The file type for which the extensions are requested.public abstract java.util.List<FileNameMatcher> getAssociations(FileType type)
@Deprecated public abstract void addFileTypeListener(FileTypeListener listener)
TOPIC
on any message bus level instead.listener
- The listener instance.@Deprecated public abstract void removeFileTypeListener(FileTypeListener listener)
TOPIC
on any message bus level instead.listener
- The listener instance.@Deprecated public FileType getKnownFileTypeOrAssociate(VirtualFile file)
getKnownFileTypeOrAssociate(VirtualFile, Project)
insteadfile
- file to ask for file type associationnull
. Never returns FileTypes.UNKNOWN
.public abstract FileType getKnownFileTypeOrAssociate(VirtualFile file, Project project)
public abstract java.lang.String getIgnoredFilesList()
public abstract void setIgnoredFilesList(java.lang.String list)
list
- List of semicolon-delimited patterns.public final void associateExtension(FileType type, java.lang.String extension)
type
- the file type to associate the extension with.extension
- the extension to associate.public final void associatePattern(FileType type, java.lang.String pattern)
public abstract void associate(FileType type, FileNameMatcher matcher)
public final void removeAssociatedExtension(FileType type, java.lang.String extension)
type
- the file type to remove the extension from.extension
- the extension to remove.public abstract void removeAssociation(FileType type, FileNameMatcher matcher)
public static FileNameMatcher parseFromString(java.lang.String pattern)
public abstract FileType getStdFileType(java.lang.String fileTypeName)