| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| <meta content="text/html; charset=ISO-8859-1" |
| http-equiv="Content-Type"> |
| <meta content="text/css" http-equiv="Content-Style-Type"> |
| <link type="text/css" charset="ISO-8859-1" href="../book.css" |
| rel="STYLESHEET"> |
| <title>Rich Team Integration</title> |
| <link href="../book.css" type="text/css" rel="stylesheet"> |
| </head> |
| <body bgcolor="#ffffff"> |
| <h2>Rich Team Integration</h2> |
| <p> |
| 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? |
| </p> |
| <p>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 <a |
| href="workbench.htm">workbench integration</a>. 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.</p> |
| <p> |
| <img |
| alt="Workbench with CVS menu items, views, tasks, and decorators" |
| src="images/teamintegration.png"></p> |
| <p>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.</p> |
| <h3>Getting started</h3> |
| <table width="73%" cellspacing="0" cellpadding="0" border="1"> |
| <tbody> |
| <tr> |
| <td width="32%">Define a |
| <b><a |
| href="../reference/api/org/eclipse/team/core/RepositoryProvider.html">RepositoryProvider</a> |
| </b> that represents your implementation.</td> |
| <td width="68%"> |
| <ul> |
| <li><a href="team_provider_repository.htm#repository_pt">Define your |
| provider using <b>org.eclipse.team.core.repository</b></a>.</li> |
| <li>Subclass <b><a |
| href="../reference/api/org/eclipse/team/core/RepositoryProvider.html">RepositoryProvider</a> |
| </b> and <a href="team_provider_repository.htm#repo_impl">implement |
| the necessary methods</a>.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Provide a configuration wizard so that users can |
| associate your provider with their projects.</td> |
| <td width="68%"> |
| <ul> |
| <li><a href="team_provider_repository.htm#ui_conf">Contribute a wizard |
| using <b>org.eclipse.team.ui.configurationWizards</b></a>.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Add your actions to the Team menu.</td> |
| <td width="68%"> |
| <ul> |
| <li><a href="team_ui_actions.htm">Add your actions to the Team |
| menu</a>.</li> |
| <li>Use the <a href="workbench_basicext_popupMenus.htm"><b>popupMenus</b></a> |
| extension to define the menu items.</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3>Enhancing resource views</h3> |
| <table width="73%" cellspacing="0" cellpadding="0" border="1"> |
| <tbody> |
| <tr> |
| <td width="32%">Add provider-specific properties to the |
| properties page for a resource.</td> |
| <td width="68%"> |
| <ul> |
| <li> <a href="preferences_prop_implement.htm">Implement</a> and <a href="preferences_prop_contribute.htm">contribute</a> |
| property pages to show team-specific properties for your resource.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Implement specialized decorators to show |
| team-related attributes</td> |
| <td width="68%"> |
| <ul> |
| <li><a href="team_ui_decorators.htm">Contribute decorators</a> |
| to resource views.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Reduce clutter by filtering out any resources |
| that are used in implementing team support. </td> |
| <td width="68%"> |
| <ul> |
| <li>Use <a href="team_resources_private.htm">team-private |
| resources</a> to hide implementation files and folders.</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3>Handling user editing and changes to resources</h3> |
| <table width="73%" cellspacing="0" cellpadding="0" border="1"> |
| <tbody> |
| <tr> |
| <td width="32%">Intervene in the saving of resources so you can |
| check permissions before a user changes a file.</td> |
| <td width="68%"> |
| <ul> |
| <li>Implement the <a href="team_provider_repository.htm#hooks">fileModificationValidator</a> |
| hook.</li> |
| <li>Use <a |
| href="../reference/api/org/eclipse/core/resources/team/FileModificationValidator.html#validateSave(org.eclipse.core.resources.IFile)"><b>validateSave</b></a> |
| to prevent or intervene in saving of files.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Intervene before a user edits a file to see if |
| it's allowed.</td> |
| <td width="68%"> |
| <ul> |
| <li>Implement the <a href="team_provider_repository.htm#hooks">fileModificationValidator</a> |
| hook.</li> |
| <li>Use <a |
| href="../reference/api/org/eclipse/core/resources/team/FileModificationValidator.html#validateEdit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)"><b>validateEdit</b></a> |
| to prevent or intervene in saving of files.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Track changes to resources in the workspace so |
| you can allow associated changes in the repository.</td> |
| <td width="68%"> |
| <ul> |
| <li>Use the <a href="team_provider_repository.htm#hooks">move/delete |
| hooks</a> to prevent or enhance moving and deleting of resources.</li> |
| <li>See <a |
| href="../reference/api/org/eclipse/core/resources/team/IMoveDeleteHook.html"><b>IMoveDeleteHook</b></a> |
| <b> </b>for more detail about what you can do.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td>Ensure that the proper resource locks are obtained for |
| resource operations that invoke the move/delete hook or |
| fileModificatonValidator.</td> |
| <td> |
| <ul> |
| <li>Use the <a href="team_provider_repository.htm#hooks">resource |
| rule factory </a> to ensure that the proper rules are obtained for |
| resource operations.</li> |
| <li>See <a |
| href="../reference/api/org/eclipse/core/resources/team/ResourceRuleFactory.html"><b>ResourceRuleFactory</b></a> |
| <b> </b>for more details.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Enable the use of linked resources.</td> |
| <td width="68%"> |
| <ul> |
| <li>See <a href="team_resources_linked.htm"><b>Team and linked |
| resources</b></a>.</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3>Streamlining repository-related tasks</h3> |
| <table width="73%" cellspacing="0" cellpadding="0" border="1"> |
| <tbody> |
| <tr> |
| <td width="32%">Provide an easy way to export a description of |
| your projects.</td> |
| <td width="68%"> |
| <ul> |
| <li>Use <a href="team_resources_projects.htm">project sets</a> |
| to export your projects without exporting the content so that users can |
| rebuild projects from the repository.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Reduce clutter in the repository by ignoring |
| files that can be regenerated.</td> |
| <td width="68%"> |
| <ul> |
| <li>Honor the <a href="team_resources_filetypes.htm"><b>ignore</b></a> |
| extension when handling files and use ignore for your plug-in's derived |
| files.</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3> Enhancing platform integration</h3> |
| <table width="73%" cellspacing="0" cellpadding="0" border="1"> |
| <tbody> |
| <tr> |
| <td width="32%">Add provider-specific preferences to the |
| preferences page.</td> |
| <td width="68%"> |
| <ul> |
| <li><a href="team_ui_prefs.htm">Add your preferences to the |
| Team category</a>.</li> |
| <li><a href="preferences_prefs_implement.htm">Build your |
| preference page</a> using workbench support.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Implement custom views to show detailed |
| information about repositories or their resources.</td> |
| <td width="68%"> |
| <ul> |
| <li>Use the <a href="workbench_basicext_views.htm"><b>views</b></a> |
| extension to contribute a view.</li> |
| <li>See the CVS provider's repository view for an example.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Add your views or actions to existing workbench |
| perspectives if appropriate.</td> |
| <td width="68%"> |
| <ul> |
| <li>Use the <a href="workbench_advext_perspectiveExtension.htm"><b>perspectiveExtensions</b></a> |
| extension to add your plug-in's shortcuts or views to existing |
| perspectives.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td width="32%">Implement a repository-specific perspective to |
| streamline repository administration or browsing.</td> |
| <td width="68%"> |
| <ul> |
| <li>Use the <a href="workbench_advext_perspectives.htm"><b>perspectives</b></a> |
| extension to define your own perspective, views, short cuts, and page |
| layout.</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <p> </p> |
| <p> </p> |
| |
| </body> |
| </html> |