| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en"> |
| <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 HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <TITLE>Adding preferences and properties</TITLE> |
| |
| <link rel="stylesheet" type="text/css" HREF="../book.css"> |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3>Adding preferences and properties</h3> |
| <p><a href="preferences_prefs.htm">Preferences</a> and <a href="preferences_prop_contribute.htm">properties</a> |
| can be contributed by team UI plug-ins using the standard techniques. The |
| only difference for a team plug-in is that preferences should be contributed |
| using the team category, so that all team related preferences are grouped |
| together. The CVS markup for the main preferences page looks like this:</p> |
| <pre><extension |
| point="org.eclipse.ui.preferencePages"> |
| <page |
| name="%PreferencePage.name" |
| <b>category="org.eclipse.team.ui.TeamPreferences"</b> |
| class="org.eclipse.team.internal.ccvs.ui.CVSPreferencesPage" |
| id="org.eclipse.team.cvs.ui.CVSPreferences"> |
| </page> |
| </extension></pre> |
| <p>The preferences dialog shows the CVS preferences underneath the team |
| category.</p> |
| <p><img src="images/teamprefs.png" alt="" border="0" ></p> |
| <p> </p> |
| <p>Properties are added as described by <a href="../reference/extension-points/org_eclipse_ui_propertyPages.html"><b>org.eclipse.ui.propertyPages</b></a>. |
| There is no special team category for properties, since a resource can only be |
| configured for one repository provider at a time. However, you must set up |
| your property page to filter on the team project persistent property (similar to |
| the way we filtered resources for popup menu actions.)</p> |
| <pre> |
| <extension |
| point="org.eclipse.ui.propertyPages"> |
| <page |
| objectClass="org.eclipse.core.resources.IFile" |
| adaptable="true" |
| name="%CVS" |
| class="org.eclipse.team.internal.ccvs.ui.CVSFilePropertiesPage" |
| id="org.eclipse.team.ccvs.ui.propertyPages.CVSFilePropertiesPage"> |
| <filter |
| <b> name="projectPersistentProperty" |
| value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature"> |
| </b> </filter> |
| </page> |
| ...</pre> |
| <p> |
| |
| </p> |
| |
| |
| |
| |
| |
| </BODY> |
| </HTML> |