## Rich Team Integration

Integrating your repository's support with the platform starts with good solid design. The goal is to integrate the workflow that your repository users know with the concepts defined in the workbench. Because there are many ways to extend workbench UI and functionality, you have a lot of flexibility in how you achieve integration. So where to start?

Building a team provider is not just a matter of learning Team API. (Subsequent sections will focus on the specific support introduced by the team plug-in.) It's a matter of understanding workbench integration. So let's start with the big picture. We'll be using the CVS client as a case study for integrating a team provider with the platform. Let's look at some of the function the CVS provider supplies and what workbench and team facilities you can use to achieve similar levels of integration.

The CVS client integrates seamlessly with the existing workbench resource perspective. It allows users to configure a project for CVS, adds functionality to a resource's menu, decorates resources with team-specific information, provides customized views that show team-specific information, adds team-oriented tasks to the task list... The list goes on and on. How can your provider achieve similar integration? Here are some basic steps to start with and links for information (both team-specific and workbench-oriented) on these topics.

### Getting started

Define a RepositoryProvider that represents your implementation. | Define your provider using org.eclipse.team.core.repository. Subclass RepositoryProvider and implement the necessary methods.
Provide a configuration wizard so that users can associate your provider with their projects. | Contribute a wizard using org.eclipse.team.ui.configurationWizards.
Add your actions to the Team menu. | Add your actions to the Team menu. Use the popupMenus extension to define the menu items.

### Enhancing resource views

Add provider-specific properties to the properties page for a resource. | Implement and contribute property pages to show team-specific properties for your resource.
Implement specialized decorators to show team-related attributes | Contribute decorators to resource views.
Reduce clutter by filtering out any resources that are used in implementing team support. | Use team-private resources to hide implementation files and folders.

### Handling user editing and changes to resources

Intervene in the saving of resources so you can check permissions before a user changes a file. | Implement the fileModificationValidator hook. Use validateSave to prevent or intervene in saving of files.
Intervene before a user edits a file to see if it's allowed. | Implement the fileModificationValidator hook. Use validateEdit to prevent or intervene in saving of files.
Track changes to resources in the workspace so you can allow associated changes in the repository. | Use the move/delete hooks to prevent or enhance moving and deleting of resources. See IMoveDeleteHook for more detail about what you can do.
Ensure that the proper resource locks are obtained for resource operations that invoke the move/delete hook or fileModificatonValidator. | Use the resource rule factory to ensure that the proper rules are obtained for resource operations. See ResourceRuleFactory for more details.
Enable the use of linked resources | See Team and linked resources

### Streamlining repository-related tasks

Provide an easy way to export a description of your projects. | Use project sets to export your projects without exporting the content so that users can rebuild projects from the repository.
Reduce clutter in the repository by ignoring files that can be regenerated. | Honor the ignore extension when handling files and use ignore for your plug-in's derived files.

### Enhancing platform integration

Add provider-specific preferences to the preferences page. | Add your preferences to the Team category. Build your preference page using workbench support.
Implement custom views to show detailed information about repositories or their resources. | Use the views extension to contribute a view. See the CVS provider's repository view for an example.
Add your views or actions to existing workbench perspectives if appropriate. | Use the perspectiveExtensions extension to add your plug-in's shortcuts or views to existing perspectives.
Implement a repository-specific perspective to streamline repository administration or browsing. | Use the perspectives extension to define your own perspective, views, short cuts, and page layout.