Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.core
Class Team

java.lang.Object
  extended by 
org.eclipse.team.core.Team

public final class Team
extends Object

The Team class provides a global point of reference for the global ignore set and the text/binary registry.

Since:
2.0

Field Summary
static int BINARY
           
protected static  SortedMap globalIgnore
           
static  Status OK_STATUS
           
protected static  SortedMap pluginIgnore
           
static int TEXT
           
static int UNKNOWN
           
 
Constructor Summary
Team ()
           
 
Method Summary
static  IStorageMerger createMerger ( IContentType type)
          Creates a storage merger for the given content type.
static  IStorageMerger createMerger ( String extension)
          Creates a storage merger for the given file extension.
  IStorageMerger createStorageMerger ( IContentType type)
          Deprecated. Use createMerger(IContentType) instead.
  IStorageMerger createStorageMerger ( String extension)
          Deprecated. Use createMerger(String) instead.
static  IIgnoreInfo[] getAllIgnores ()
          Returns the list of global ignores.
static  IFileTypeInfo[] getAllTypes ()
          Deprecated. Use getFileContentManager().getExtensionMappings() instead.
static  IIgnoreInfo[] getDefaultIgnores ()
          Return the default ignore infos (i.e. those that are specified in plugin manifests).
static  IFileTypeInfo[] getDefaultTypes ()
          Deprecated. Use Team.getFileContentManager().getDefaultExtensionMappings() instead.
static  IFileContentManager getFileContentManager ()
          Get the file content manager which implements the API for manipulating the mappings between file names, file extensions and content types.
static  IProjectSetSerializer getProjectSetSerializer ( String id)
          Deprecated. Use RepositoryProviderType.getProjectSetCapability() to obtain an instance of ProjectSetCapability instead.
static int getType ( IStorage storage)
          Deprecated. Use getFileContentManager().getType(IStorage storage) instead.
static boolean isIgnored ( IFile file)
          Deprecated. use isIgnoredHint instead
static boolean isIgnoredHint ( IFile file)
          Deprecated. use isIgnoredHint(IResource) instead
static 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. Use getFileContentManager().setExtensionMappings() instead.
static void shutdown ()
          Shut down the registry, persisting its state.
static void startup ()
          Initialize the registry, restoring its state.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK_STATUS

public static final 
Status OK_STATUS

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

TEXT

public static final int TEXT
See Also:
Constant Field Values

BINARY

public static final int BINARY
See Also:
Constant Field Values

globalIgnore

protected static 
SortedMap globalIgnore

pluginIgnore

protected static 
SortedMap pluginIgnore
Constructor Detail

Team

public Team()
Method Detail

getType

public static int getType(
IStorage storage)
Deprecated. Use getFileContentManager().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

public static boolean isIgnoredHint(
IResource resource)
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

public static boolean isIgnoredHint(
IFile file)
Deprecated. use isIgnoredHint(IResource) instead

Returns whether the given file should be ignored.


isIgnored

public static boolean isIgnored(
IFile file)
Deprecated. use isIgnoredHint instead

Returns whether the given file should be ignored.


getAllTypes

public static 
IFileTypeInfo[] getAllTypes()
Deprecated. Use getFileContentManager().getExtensionMappings() instead.

Return all known file types.

Returns:
all known file types

getAllIgnores

public static 
IIgnoreInfo[] getAllIgnores()
Returns the list of global ignores.


setAllTypes

public static void setAllTypes(
String[] extensions,
                               int[] types)
Deprecated. Use getFileContentManager().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 extensions
types - the file types

setAllIgnores

public static void setAllIgnores(
String[] patterns,
                                 boolean[] enabled)
Add patterns to the list of global ignores.

Parameters:
patterns - Array of patterns to set
enabled - 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

public static 
IProjectSetSerializer getProjectSetSerializer(
String id)
Deprecated. Use RepositoryProviderType.getProjectSetCapability() to obtain an instance of ProjectSetCapability instead.


getDefaultIgnores

public static 
IIgnoreInfo[] getDefaultIgnores()
Return the default ignore infos (i.e. those that are specified in plugin manifests).

Returns:
the default ignore infos.
Since:
3.0

getDefaultTypes

public static 
IFileTypeInfo[] 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

public static 
IFileContentManager 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:
IFileContentManager

createMerger

public static 
IStorageMerger createMerger(
IContentType type)
Creates a storage merger for the given content type. If no storage merger is registered for the given content type null 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

public static 
IStorageMerger createMerger(
String extension)
Creates a storage merger for the given file extension. If no storage merger is registered for the file extension null 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

public 
IStorageMerger createStorageMerger(
IContentType type)
Deprecated. Use createMerger(IContentType) instead.

Creates a storage merger for the given content type. If no storage merger is registered for the given content type null 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

public 
IStorageMerger createStorageMerger(
String extension)
Deprecated. Use createMerger(String) instead.

Creates a storage merger for the given file extension. If no storage merger is registered for the file extension null 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

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire