File types

The presence of a repository management system may dictate special handling needs for files.  For example, some files should be omitted from version control.  Some providers have special handling for text vs. binary files.  The team plug-in defines extension points that allow other plug-ins to provide information about their file types.  In all cases, special handling is ultimately left up to the user via the team Preferences page.  These extensions allow plug-ins to seed the preferences with values appropriate for the plug-in.

Ignored files

In several cases, it may be unnecessary to keep certain files under repository control.  For example, resources that are derived from existing resources can often be omitted from the repository.  For example, compiled source files, (such as Java ".class" files), can be omitted since their corresponding source (".java") file is in the repository.  It also may be inappropriate to version control metadata files that are generated by repository providers.  The extension point allows providers to declare file types that should be ignored for repository provider operations.

The markup simply declares a file name pattern that should be ignored and a selected attribute which declares the default selection value of the file type in the preferences dialog.  It is ultimately up to the user to decide which files should be ignored.  The user may select, deselect, add or delete file types from the default list of ignored files.

Text vs. binary files

Some repositories implement different handling for text vs. binary files.  The extension allows plug-ins to declare file types as text or binary files.  For example, the Java tooling declares the following:

<extension point="">
  <fileTypes extension="java" type="text"/>
  <fileTypes extension="classpath" type="text"/>
  <fileTypes extension="properties" type="text"/>
  <fileTypes extension="class" type="binary"/>
  <fileTypes extension="jar" type="binary"/>
  <fileTypes extension="zip" type="binary"/>

The markup lets plug-ins define a file type by extension and assign a type of text or binary.  As with ignored files, it is ultimately up to the user to manage the list of text and binary file types.