|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.openapi.fileTypes.FileTypeManager
public abstract class FileTypeManager
Manages the relationship between filenames and FileType instances.
| Constructor Summary | |
|---|---|
FileTypeManager()
|
|
| Method Summary | |
|---|---|
abstract void |
addFileTypeListener(FileTypeListener listener)
Adds a listener for receiving notifications about changes in the list of registered file types. |
abstract void |
associateExtension(FileType type,
java.lang.String extension)
Adds an extension to the list of extensions associated with a file type. |
abstract java.lang.String[] |
getAssociatedExtensions(FileType type)
Returns the list of extensions associated with the specified file type. |
abstract FileType |
getFileTypeByExtension(java.lang.String extension)
Returns the file type for the specified extension. |
abstract FileType |
getFileTypeByFile(VirtualFile file)
Returns the file type for the specified file. |
abstract FileType |
getFileTypeByFileName(java.lang.String fileName)
Returns the file type for the specified file name. |
static FileTypeManager |
getInstance()
Returns the singleton instance of the FileTypeManager component. |
abstract FileType |
getKnownFileTypeOrAssociate(VirtualFile file)
If fileName is already associated with any known file type returns it. |
abstract FileType[] |
getRegisteredFileTypes()
Returns the list of all registered file types. |
abstract boolean |
isFileIgnored(java.lang.String name)
Checks if the specified file is ignored by IDEA. |
abstract void |
registerFileType(FileType type,
java.lang.String[] defaultAssociatedExtensions)
Registers a file type. |
abstract void |
removeAssociatedExtension(FileType type,
java.lang.String extension)
Removes an extension from the list of extensions associated with a file type. |
abstract void |
removeFileTypeListener(FileTypeListener listener)
Removes a listener for receiving notifications about changes in the list of registered file types. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.intellij.openapi.components.SettingsSavingComponent |
|---|
save |
| Constructor Detail |
|---|
public FileTypeManager()
| Method Detail |
|---|
public static FileTypeManager getInstance()
public abstract void registerFileType(@NotNull
FileType type,
@Nullable
java.lang.String[] defaultAssociatedExtensions)
type - 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 '.'.
@NotNull
public abstract FileType getFileTypeByFileName(@NotNull
java.lang.String fileName)
fileName - The file name for which the type is requested.
@NotNull
public abstract FileType getFileTypeByFile(@NotNull
VirtualFile file)
file - The file for which the type is requested.
@NotNull
public abstract FileType getFileTypeByExtension(@NotNull
java.lang.String extension)
extension - The extension for which the file type is requested, not including the leading '.'.
public abstract FileType[] getRegisteredFileTypes()
public abstract boolean isFileIgnored(@NotNull
java.lang.String name)
name - The name of the file to check.
public abstract java.lang.String[] getAssociatedExtensions(FileType type)
type - The file type for which the extensions are requested.
public abstract void addFileTypeListener(FileTypeListener listener)
listener - The listener instance.public abstract void removeFileTypeListener(FileTypeListener listener)
listener - The listener instance.@NotNull public abstract FileType getKnownFileTypeOrAssociate(VirtualFile file)
StdFileTypes.UNKNOWN.
public abstract void associateExtension(FileType type,
java.lang.String extension)
type - the file type to associate the extension with.extension - the extension to associate.
public abstract void removeAssociatedExtension(FileType type,
java.lang.String extension)
type - the file type to remove the extension from.extension - the extension to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||