Package org.eclipse.team.core
Class Team
java.lang.Object
org.eclipse.team.core.Team
The Team class provides a global point of reference for the global ignore set
and the text/binary registry.
- Since:
- 2.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IStorageMerger
createMerger
(String extension) Creates a storage merger for the given file extension.static IStorageMerger
createMerger
(IContentType type) Creates a storage merger for the given content type.createStorageMerger
(String extension) Deprecated.Deprecated.UsecreateMerger(IContentType)
instead.static IIgnoreInfo[]
Returns the list of global ignores.static IFileTypeInfo[]
Deprecated.UsegetFileContentManager().getExtensionMappings()
instead.static IBundleImporter[]
Returns the available bundle importers.static IIgnoreInfo[]
Return the default ignore infos (i.e. those that are specified in plugin manifests).static IFileTypeInfo[]
Deprecated.Use Team.getFileContentManager().getDefaultExtensionMappings() instead.static IFileContentManager
Get the file content manager which implements the API for manipulating the mappings between file names, file extensions and content types.static IProjectSetSerializer
Deprecated.UseRepositoryProviderType.getProjectSetCapability()
to obtain an instance ofProjectSetCapability
instead.static int
Deprecated.UsegetFileContentManager().getType(IStorage storage)
instead.static boolean
Deprecated.use isIgnoredHint insteadstatic boolean
isIgnoredHint
(IFile file) Deprecated.use isIgnoredHint(IResource) insteadstatic boolean
isIgnoredHint
(IResource resource) Returns whether the given file or folder with its content should be ignored.static void
setAllIgnores
(String[] patterns, boolean[] enabled) Add patterns to the list of global ignores.static void
setAllTypes
(String[] extensions, int[] types) Deprecated.UsegetFileContentManager().setExtensionMappings()
instead.static void
shutdown()
Shut down the registry, persisting its state.static void
startup()
Initialize the registry, restoring its state.
-
Field Details
-
OK_STATUS
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
TEXT
public static final int TEXT- See Also:
-
BINARY
public static final int BINARY- See Also:
-
globalIgnore
-
pluginIgnore
-
-
Constructor Details
-
Team
public Team()
-
-
Method Details
-
getType
Deprecated.UsegetFileContentManager().getType(IStorage storage)
instead.Return the type of the given IStorage. First, we check whether a mapping has been defined for the name of the IStorage. If this is not the case, we check for a mapping with the extension. If no mapping is defined, UNKNOWN is returned. Valid return values are: Team.TEXT Team.BINARY Team.UNKNOWN- Parameters:
storage
- the IStorage- Returns:
- whether the given IStorage is TEXT, BINARY, or UNKNOWN
-
isIgnoredHint
Returns whether the given file or folder with its content should be ignored. This method answers true if the file matches one of the global ignore patterns, or if the file is marked as derived.- Parameters:
resource
- the file or folder- Returns:
- whether the file should be ignored
-
isIgnoredHint
Deprecated.use isIgnoredHint(IResource) insteadReturns whether the given file should be ignored.- Parameters:
file
- file to check- Returns:
true
if this file should be ignored, andfalse
otherwise
-
isIgnored
Deprecated.use isIgnoredHint insteadReturns whether the given file should be ignored.- Parameters:
file
- file to check- Returns:
true
if this file should be ignored, andfalse
otherwise
-
getAllTypes
Deprecated.UsegetFileContentManager().getExtensionMappings()
instead.Return all known file types.- Returns:
- all known file types
-
getAllIgnores
Returns the list of global ignores.- Returns:
- all ignore infos representing globally ignored patterns
-
setAllTypes
Deprecated.UsegetFileContentManager().setExtensionMappings()
instead.Set the file type for the give extensions. This will replace the existing file types with this new list. Valid types are: Team.TEXT Team.BINARY Team.UNKNOWN- Parameters:
extensions
- the file extensionstypes
- the file types
-
setAllIgnores
Add patterns to the list of global ignores.- Parameters:
patterns
- Array of patterns to setenabled
- Array of booleans indicating if given pattern is enabled
-
startup
public static void startup()Initialize the registry, restoring its state. This method is called by the plug-in upon startup, clients should not call this method -
shutdown
public static void shutdown()Shut down the registry, persisting its state. This method is called by the plug-in upon shutdown, clients should not call this method -
getProjectSetSerializer
Deprecated.UseRepositoryProviderType.getProjectSetCapability()
to obtain an instance ofProjectSetCapability
instead. -
getDefaultIgnores
Return the default ignore infos (i.e. those that are specified in plugin manifests).- Returns:
- the default ignore infos.
- Since:
- 3.0
-
getDefaultTypes
Deprecated.Use Team.getFileContentManager().getDefaultExtensionMappings() instead.TODO: change to file content manager Return the default file type bindings (i.e. those that are specified in plugin manifests).- Returns:
- the default file type bindings
- Since:
- 3.0
-
getFileContentManager
Get the file content manager which implements the API for manipulating the mappings between file names, file extensions and content types.- Returns:
- an instance of IFileContentManager
- Since:
- 3.1
- See Also:
-
createMerger
Creates a storage merger for the given content type. If no storage merger is registered for the given content typenull
is returned.- Parameters:
type
- the type for which to find a storage merger- Returns:
- a storage merger for the given type, or
null
if no storage merger has been registered - Since:
- 3.4
-
createMerger
Creates a storage merger for the given file extension. If no storage merger is registered for the file extensionnull
is returned.- Parameters:
extension
- the extension for which to find a storage merger- Returns:
- a stream merger for the given type, or
null
if no storage merger has been registered - Since:
- 3.4
-
createStorageMerger
Deprecated.UsecreateMerger(IContentType)
instead.Creates a storage merger for the given content type. If no storage merger is registered for the given content typenull
is returned.- Parameters:
type
- the type for which to find a storage merger- Returns:
- a storage merger for the given type, or
null
if no storage merger has been registered - Since:
- 3.2
-
createStorageMerger
Deprecated.UsecreateMerger(String)
instead.Creates a storage merger for the given file extension. If no storage merger is registered for the file extensionnull
is returned.- Parameters:
extension
- the extension for which to find a storage merger- Returns:
- a stream merger for the given type, or
null
if no storage merger has been registered - Since:
- 3.2
-
getBundleImporters
Returns the available bundle importers.EXPERIMENTAL. This interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the Team team.
- Returns:
- IBundleImporter[] returns the available bundle importers
- Since:
- 3.6
- Restriction:
- This method is not intended to be referenced by clients.
-
createMerger(String)
instead.