public class MockFileTypeManager extends FileTypeManager
FileTypeRegistry.FileTypeDetectorTOPICourInstanceGetter| Constructor and Description |
|---|
MockFileTypeManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileTypeListener(FileTypeListener listener)
Adds a listener for receiving notifications about changes in the list of
registered file types.
|
void |
associate(FileType type,
FileNameMatcher matcher) |
FileType |
findFileTypeByName(java.lang.String fileTypeName)
Finds a file type with the specified name.
|
java.lang.String [] |
getAssociatedExtensions(FileType type)
Returns the list of extensions associated with the specified file type.
|
java.util.List<FileNameMatcher> |
getAssociations(FileType type) |
FileType |
getFileTypeByExtension(java.lang.String extension)
Returns the file type for the specified extension.
|
FileType |
getFileTypeByFile(VirtualFile file)
Returns the file type for the specified file.
|
FileType |
getFileTypeByFileName(java.lang.String fileName)
Same as FileTypeRegistry.getFileTypeByFileName(CharSequence) but receives String parameter.
|
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.
|
FileType |
getKnownFileTypeOrAssociate(VirtualFile file,
Project project) |
FileType [] |
getRegisteredFileTypes()
Returns the list of all registered file types.
|
FileType |
getStdFileType(java.lang.String fileTypeName) |
boolean |
isFileIgnored(java.lang.String name)
Checks if the specified file is ignored by the IDE.
|
boolean |
isFileIgnored(VirtualFile file) |
void |
registerFileType(FileType type,
java.util.List<? extends FileNameMatcher> defaultAssociations) |
void |
removeAssociation(FileType type,
FileNameMatcher matcher) |
void |
removeFileTypeListener(FileTypeListener listener)
Removes a listener for receiving notifications about changes in the list of
registered file types.
|
void |
setIgnoredFilesList(java.lang.String list)
Sets new list of semicolon-delimited patterns for files and folders which
are excluded from the project structure.
|
associateExtension, associatePattern, getInstance, getKnownFileTypeOrAssociate, parseFromString, registerFileType, removeAssociatedExtensionfindFileTypeByLanguage, getFileTypeByFile, getFileTypeByFileName, isFileOfTypepublic void registerFileType(FileType type, java.util.List<? extends FileNameMatcher> defaultAssociations)
registerFileType in class FileTypeManagerpublic FileType getFileTypeByFileName(java.lang.String fileName)
FileTypeRegistrygetFileTypeByFileName in class FileTypeRegistrypublic FileType getFileTypeByFile(VirtualFile file)
FileTypeRegistrygetFileTypeByFile in class FileTypeRegistryfile - The file for which the type is requested.public FileType getFileTypeByExtension(java.lang.String extension)
FileTypeRegistryFileTypeRegistry.getFileTypeByFile(VirtualFile)getFileTypeByExtension in class FileTypeRegistryextension - The extension for which the file type is requested, not including the leading '.'.UnknownFileType.INSTANCE if corresponding file type not foundpublic FileType [] getRegisteredFileTypes()
FileTypeRegistrygetRegisteredFileTypes in class FileTypeRegistrypublic boolean isFileIgnored(java.lang.String name)
FileTypeManagerisFileIgnored in class FileTypeManagername - The name of the file to check.true if the file is ignored, false otherwise.public boolean isFileIgnored(VirtualFile file)
isFileIgnored in class FileTypeRegistrypublic java.lang.String [] getAssociatedExtensions(FileType type)
FileTypeManagergetAssociatedExtensions in class FileTypeManagertype - The file type for which the extensions are requested.public java.util.List<FileNameMatcher> getAssociations(FileType type)
getAssociations in class FileTypeManagerpublic void addFileTypeListener(FileTypeListener listener)
FileTypeManageraddFileTypeListener in class FileTypeManagerlistener - The listener instance.public void removeFileTypeListener(FileTypeListener listener)
FileTypeManagerremoveFileTypeListener in class FileTypeManagerlistener - The listener instance.public FileType getKnownFileTypeOrAssociate(VirtualFile file, Project project)
getKnownFileTypeOrAssociate in class FileTypeManagerpublic java.lang.String getIgnoredFilesList()
FileTypeManagergetIgnoredFilesList in class FileTypeManagerpublic void setIgnoredFilesList(java.lang.String list)
FileTypeManagersetIgnoredFilesList in class FileTypeManagerlist - List of semicolon-delimited patterns.public void associate(FileType type, FileNameMatcher matcher)
associate in class FileTypeManagerpublic void removeAssociation(FileType type, FileNameMatcher matcher)
removeAssociation in class FileTypeManagerpublic FileType getStdFileType(java.lang.String fileTypeName)
getStdFileType in class FileTypeManagerpublic FileType findFileTypeByName(java.lang.String fileTypeName)
FileTypeRegistryfindFileTypeByName in class FileTypeRegistry