public interface IFileContentManager
Team.getFileContentManager()
Modifier and Type | Method and Description |
---|---|
void |
addExtensionMappings(String[] extensions,
int[] types)
Map a set of file extensions to a set of content types and save the mapping in
the preferences.
|
void |
addNameMappings(String[] names,
int[] types)
Map a set of file names to a set of content types and save the mappings in
the preferences.
|
IStringMapping[] |
getDefaultExtensionMappings()
Get all the plugin-contributed mappings from file extensions to content types.
|
IStringMapping[] |
getDefaultNameMappings()
Get all the plugin-contributed mappings from file names to content types.
|
IStringMapping[] |
getExtensionMappings()
Get all the currently defined mappings from file names to content types.
|
IStringMapping[] |
getNameMappings()
Get all the currently defined mappings from file names to content types.
|
int |
getType(IStorage storage)
Get the content type for a given instance of
IStorage . |
int |
getTypeForExtension(String extension)
Get the content type for a given file extension.
|
int |
getTypeForName(String filename)
Get the content type for a given file name.
|
boolean |
isKnownExtension(String extension)
Check whether the given file extension is assigned to a specific type in the content type registry.
|
boolean |
isKnownFilename(String filename)
Check whether the given file name is assigned to a specific type in the content type registry.
|
void |
setExtensionMappings(String[] extensions,
int[] types)
Map a set of file extensions to a set of content types and save the
mapping in the preferences.
|
void |
setNameMappings(String[] names,
int[] types)
Map a set of file names to a set of content types and save the mappings in
the preferences.
|
int getType(IStorage storage)
IStorage
. User-defined mappings
take precedence over plugin-contributed mappings; further, mappings for the entire file name
take precedence over mappings for the file extension only.storage
- the instance of IStorage
.Team.UNKNOWN
, Team.TEXT
or Team.BINARY
.boolean isKnownFilename(String filename)
filename
- the file name to check forboolean isKnownExtension(String extension)
extension
- the extension to check forint getTypeForName(String filename)
filename
- The file nameTeam.UNKNOWN
, Team.TEXT
or Team.BINARY
.int getTypeForExtension(String extension)
extension
- The extensionTeam.UNKNOWN
, Team.TEXT
or Team.BINARY
.void addNameMappings(String[] names, int[] types)
names
- The file namestypes
- The corresponding types, each one being one of
Team.UNKNOWN
,Team.TEXT
or
Team.BINARY
.void addExtensionMappings(String[] extensions, int[] types)
extensions
- The extensionstypes
- The corresponding types, each one being one of
Team.UNKNOWN
,Team.TEXT
or
Team.BINARY
.void setNameMappings(String[] names, int[] types)
names
- The file namestypes
- The corresponding types, each one being one of
Team.UNKNOWN
,Team.TEXT
or
Team.BINARY
.void setExtensionMappings(String[] extensions, int[] types)
extensions
- The extensionstypes
- The corresponding types, each one being one of
Team.UNKNOWN
,Team.TEXT
or
Team.BINARY
.IStringMapping[] getNameMappings()
IStringMapping[] getExtensionMappings()
IStringMapping[] getDefaultNameMappings()
IStringMapping[] getDefaultExtensionMappings()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.