Eclipse Platform
2.1

org.eclipse.team.core
Class Team

java.lang.Object
  |
  +--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
           
static Status OK_STATUS
           
static String PREF_TEAM_IGNORES
           
static String PREF_TEAM_SEPARATOR
           
static String PREF_TEAM_TYPES
           
static int TEXT
           
static int UNKNOWN
           
 
Constructor Summary
Team()
           
 
Method Summary
static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor)
          Deprecated.  
static IIgnoreInfo[] getAllIgnores()
          Returns the list of global ignores.
static IFileTypeInfo[] getAllTypes()
          Return all known file types.
static IProjectSetSerializer getProjectSetSerializer(String id)
           
static int getType(IStorage storage)
          Return the type of the given IStorage.
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 should be ignored.
static void removeNatureFromProject(IProject proj, String natureId, IProgressMonitor monitor)
          Deprecated.  
static void setAllIgnores(String[] patterns, boolean[] enabled)
          Add patterns to the list of global ignores.
static void setAllTypes(String[] extensions, int[] types)
          Set the file type for the give extension to the given type.
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

PREF_TEAM_IGNORES

public static final String PREF_TEAM_IGNORES

PREF_TEAM_TYPES

public static final String PREF_TEAM_TYPES

PREF_TEAM_SEPARATOR

public static final String PREF_TEAM_SEPARATOR

OK_STATUS

public static final Status OK_STATUS

UNKNOWN

public static final int UNKNOWN

TEXT

public static final int TEXT

BINARY

public static final int BINARY
Constructor Detail

Team

public Team()
Method Detail

getType

public static int getType(IStorage storage)
Return the type of the given IStorage. 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 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:
file - the file
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()
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)
Set the file type for the give extension to the given type. Valid types are: Team.TEXT Team.BINARY Team.UNKNOWN
Parameters:
extension - the file extension
type - the file type

setAllIgnores

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

removeNatureFromProject

public static void removeNatureFromProject(IProject proj,
                                           String natureId,
                                           IProgressMonitor monitor)
                                    throws TeamException
Deprecated.  

Utility method for removing a project nature from a project.
Parameters:
proj - the project to remove the nature from
natureId - the nature id to remove
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.

addNatureToProject

public static void addNatureToProject(IProject proj,
                                      String natureId,
                                      IProgressMonitor monitor)
                               throws TeamException
Deprecated.  

Utility method for adding a nature to a project.
Parameters:
proj - the project to add the nature
natureId - the id of the nature to assign to the project
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
TeamException - if a problem occured setting the nature

startup

public static void startup()
                    throws CoreException
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)

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.