Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2006-08-17 18:55:51 +0000
committercvs2svn2006-08-17 18:55:51 +0000
commitebe5df0dc64c9dca4e0a98a5321a25c8c67a3bb1 (patch)
treea21794797d0cadae91c122635b84a938cd738edc
parentf549b238f12794cf1888e0e5ba10d08c68fa1317 (diff)
downloadeclipse.platform.team-ebe5df0dc64c9dca4e0a98a5321a25c8c67a3bb1.tar.gz
eclipse.platform.team-ebe5df0dc64c9dca4e0a98a5321a25c8c67a3bb1.tar.xz
eclipse.platform.team-ebe5df0dc64c9dca4e0a98a5321a25c8c67a3bb1.zip
This commit was manufactured by cvs2svn to create branch
'branch_20060714_FileBuffers'. Cherrypick from master 2006-08-17 18:55:49 UTC Michael Valenta <mvalenta> 'Bug 153844 Date tag not available for merge': bundles/org.eclipse.team.cvs.ui/plugin.properties bundles/org.eclipse.team.cvs.ui/plugin.xml bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties270
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml1615
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java382
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java1740
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java123
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java1125
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java746
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java240
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties1147
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java217
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java309
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java834
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java693
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java683
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java82
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java139
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java670
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java157
18 files changed, 11172 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
new file mode 100644
index 000000000..8b05e5938
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.properties
@@ -0,0 +1,270 @@
+###############################################################################
+# Copyright (c) 2000, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Maik Schreiber - bug 102461
+###############################################################################
+providerName=Eclipse.org
+pluginName=CVS Team Provider UI
+
+CVS=CVS
+ServerEncoding=Server Encoding
+
+CVSRepositoryExploring=CVS Repository Exploring
+CVSRepositoryExploring.openPerspectiveDescription=Open the CVS Repository Exploring Perspective
+CVSRepositoryExploring.description=This perspective is designed to support the exploration of CVS repositories. It incorporates views for browsing CVS repositories and for browsing file history.
+
+CVSGroupMenu.label=C&VS
+
+SharingWizard.name=CVS
+
+WorkspaceSynchronizeWizard.name=CVS
+WorkspaceSynchronizeWizard.description=Synchronize resources in the workspace with their associated remote CVS repository.
+CVSWorkspaceParticipant=CVS
+CVSResourceMappingParticipant=CVS
+CVSMergeParticipant=CVS Merge
+CVSCompareParticipant=CVS Compare
+
+PreferencePage.name=CVS
+ConsolePreferencePage.name=Console
+DecoratorPreferencePage.name=Label Decorations
+ExtMethodPreferencePage.name=Ext Connection Method
+ProxyPreferencePage.name=Proxy Settings
+WatchEditPreferencePage.name=Watch/Edit
+ComparePreferencePage.name=Synchronize/Compare
+UpdateMergePreferencePage.name=Update/Merge
+AnnotatePreferencePage.name=Annotate
+
+newWizardCategoryName=CVS
+newProjectCheckoutWizard=Projects from CVS
+newLocationWizard=CVS Repository Location
+newLocationWizardDescription=Create a new CVS repository location
+
+DecoratorStandard.name=CVS
+DecoratorStandard.desc=Shows CVS specific information on resources in projects under CVS control. Information includes the revision number, branch or version name, etc. To customize the CVS decorator go to Team>CVS>Label Decorations.
+
+AddAction.label=Add to &Version Control
+AddAction.name=Add to Version Control
+AddAction.tooltip=Add the Selected Resources to Version Control
+
+MergeAction.label=&Merge...
+MergeAction.name=Merge
+MergeAction.tooltip=Merge
+
+BranchAction.label=&Branch...
+BranchAction.name=Branch
+BranchAction.tooltip=Branch
+
+CompareRemoteResourcesAction.label=Com&pare
+CompareRemoteResourcesAction.tooltip=Compare the Remote Resources with Each Other
+
+CompareRemoteWithTagAction.label=Compare &With...
+CompareRemoteWithTagAction.tooltip=Compare with a Branch or a Version
+
+CompareWithRemoteAction.label=La&test from Repository
+CompareWithRemoteAction.name=Compare With Latest from Repository
+CompareWithRemoteAction.tooltip=Compare with Content on CVS Server
+
+CompareWithRevisionAction.label=&History...
+CompareWithRevisionAction.name=Compare With Revision
+CompareWithRevisionAction.tooltip=Compare with Revision on CVS Server
+
+CompareWithTagAction.label=Another &Branch or Version...
+CompareWithTagAction.name=Compare With Another Branch or Version
+CompareWithTagAction.tooltip=Compare with a Branch or a Version on the CVS Server
+
+OverrideAndUpdateAction.name=Override and Update
+OverrideAndUpdateAction.tooltip=Overwrite the local changes with those from the repository.
+
+OverrideAndCommitAction.name=Override and Commit
+OverrideAndCommitAction.tooltip=Overwrite the changes in the repository with the local changes.
+
+ContentAction.label=Compare File Contents
+ContentAction.tooltip=Use File Contents Instead of Timestamps When Comparing
+
+ConvertNature.label=Convert Provider from Nature
+ConvertNature.tooltip=Converts a CVS project from using natures to using properties
+
+CopyRepositoryNameAction.label=&Copy to Clipboard
+CopyRepositoryNameAction.tooltip=Copy Repository Names to Clipboard
+
+IgnoreAction.label=Add to .cvs&ignore...
+IgnoreAction.name=Add to .cvsignore
+IgnoreAction.tooltip=Ignore the Selected Resources when Synchronizing
+
+RefreshTagsAction.label=Refresh &Branches...
+RefreshTagsAction.tooltip=Refresh the branch tags and their members using the auto-refresh files associated with each remote folder
+
+RemoveRootAction.label=Discard &Location
+RemoveRootAction.tooltip=Discard Location
+
+ReplaceWithRevisionAction.label=&History...
+ReplaceWithRevisionAction.name=Replace With Revision
+ReplaceWithRevisionAction.tooltip=Replace with Revision on CVS Server
+
+ReplaceWithTagAction.label=&Another Branch or Version...
+ReplaceWithTagAction.name=Replace With Another Branch or Version
+ReplaceWithTagAction.tooltip=Replace with Branch or Version on the CVS Server
+
+TagAction.label=&Tag as Version...
+TagAction.name=Tag as Version
+TagAction.tooltip=Tag the resources with a CVS version tag
+
+TagInRepositoryAction.label=&Tag as Version...
+TagInRepositoryAction.name=Tag as Version
+TagInRepositoryAction.tooltip=Tag the resources with a CVS version tag
+
+MoveTagAction.label=Tag with &Existing...
+MoveTagAction.tooltip=Tag the selected resources with an existing tag
+
+SetKeywordSubstitutionAction.label=Cha&nge ASCII/Binary Property...
+SetKeywordSubstitutionAction.name=Change ASCII/Binary Property
+SetKeywordSubstitutionAction.tooltip=Change whether the selected resources should be treated as ASCII or binary on the CVS Server
+
+UpdateAction.label=&Update
+UpdateAction.name=Update
+UpdateAction.tooltip=Update resources with new content from the repository
+
+UpdateActionSwitch.label=S&witch to Another Branch or Version...
+UpdateActionSwitch.name=Switch to Another Branch or Version
+UpdateActionSwitch.tooltip=Switch to Another Branch or Version
+
+ReplaceWithAction.label=La&test from Repository
+ReplaceWithAction.name=Replace With Latest from Repository
+ReplaceWithAction.tooltip=Replace with last committed content from CVS Server
+
+ConfigureTags.label=Configure &Branches and Versions...
+ConfigureTags.tooltip=Configure the branch and version tags shown in the workbench
+
+AddToBranch.label=Add &to Branch List...
+AddToBranch.tooltip=Add the selected remote folder to a branch
+
+CommitAction.label=&Commit...
+CommitAction.name=Commit
+CommitAction.tooltip=Commit resources to the repository
+
+CheckoutAction.label=&Check Out
+CheckoutAction.tooltip=Check out a module from the repository to the workspace
+
+CheckoutAsAction.label=Check Out &As...
+CheckoutAsAction.tooltip=Check out a module from the repository to the workspace
+
+OpenLogEntryAction.label=&Open
+OpenLogEntryAction.tooltip=Open Remote File
+
+OpenRemoteFileAction.label=&Open
+OpenRemoteFileAction.tooltip=Open Remote File
+
+ShowHistoryAction.label=Show &History
+ShowHistoryAction.name=Show History
+ShowHistoryAction.tooltip=Show History
+
+ShowAnnotationAction.label=Show Ann&otation
+ShowAnnotationAction.name=Show Annotation
+ShowAnnotationAction.tooltip=Show Annotation
+
+GenerateDiff.label=Create &Patch...
+GenerateDiff.name=Create Patch
+GenerateDiff.tooltip=Compare your workspace contents with the server and generate a diff file that can be used as a patch file.
+
+RefreshFromLocal.label=&Refresh from local CVS state
+RefreshFromLocal.tooltip=Refresh the workbench with changes made to CVS projects from outside the workbench.
+
+Synchronize.label=&Synchronize with Repository
+Synchronize.name=Synchronize with Repository
+Synchronize.tooltip=Synchronize the workspace resources with those in the repository
+
+EditAction.label=&Edit
+EditAction.tooltip=Perform a 'cvs edit' on the selected files
+
+UneditAction.label=U&nedit
+UneditAction.tooltip=Perform a 'cvs unedit' on the selected files
+
+viewCategory=CVS
+
+Console.name=CVS Console
+
+RepositoriesView.name=CVS Repositories
+
+HistoryFilter.label=&Filter History
+HistoryFilter.tooltip=Filter History
+
+HistoryView.name=CVS Resource History
+
+UnmanageFolder.label=&Disconnect...
+UnmanageFolder.tooltip=Disconnect from the CVS repository.
+
+CVSActionSet.categoryName=CVS
+CVSActionSet.description=Actions that apply when working with CVS repositories
+CVSActionSet.newLabel=Add CVS Repository
+CVSActionSet.newTooltip=Add CVS Repository
+CVSActionSet.checkoutLabel=Checkout from CVS
+CVSActionSet.checkoutTooltip=Checkout from CVS
+
+RestoreFromRepositoryAction.label=&Restore from Repository...
+RestoreFromRepositoryAction.tooltip=Restore resources that have been deleted from the remote folder.
+
+ShowEditorsAction.label=Show &Editors
+ShowEditorsAction.tooltip=Perform a 'cvs editors' on the selected file
+
+EditorsView.name=CVS Editors
+AnnotateView.name=CVS Annotate
+CVSConsoleFont.label=CVS Console Font
+CVSConsoleFont.description=The font for the CVS console.
+
+WorkInProgress.name=Work In Progress
+CVSRemoteQuickDiffProvider.label=&Latest CVS Revision
+
+NewDateTagAction.label=&Date Tag...
+NewDateTagAction.tooltip=Add new date tag
+
+ViewCommand.repositoriesView.name=CVS Repositories
+ViewCommand.repositoriesView.description=Show the CVS Repositories view
+ViewCommand.editorsView.name=CVS Editors
+ViewCommand.editorsView.description=Show the CVS Editors view
+ViewCommand.annotateView.name=CVS Annotate
+ViewCommand.annotateView.description=Show the CVS Annotate view
+
+newProjectCheckoutWizardDescription=Checkout one or more projects from a CVS Repository.
+newProjectCheckoutWizardDescription2=Create a new project by checking out an existing project from a CVS repository.
+PasswordManagement=Password Management
+
+OutgoingChangeForegroundColor.label=Outgoing Change (Foreground)
+OutgoingChangeForegroundColor.description=This color is used for the foreground color for resources that have outgoing changes.
+OutgoingChangeBackgroundColor.label=Outgoing Change (Background)
+OutgoingChangeBackgroundColor.description=This color is used for the background color for resources that have outgoing changes.
+OutgoingChangeFont.label=Outgoing Change Font
+OutgoingChangeFont.description=The font used to display outgoing changes.
+IgnoredResourceFont.label=Ignored Resource Font
+IgnoredResourceFont.description=The font used to display resources that are ignored from CVS.
+IgnoredResourceForegroundColor.label=Ignored Resource (Foreground)
+IgnoredResourceForegroundColor.description=This color is used for the foreground color for resources that are ignored from CVS.
+IgnoredResourceBackgroundColor.label=Ignored Resource (Background)
+IgnoredResourceBackgroundColor.description=This color is used for the background color for resources that are ignored from CVS.
+CVSHistoryCategory.label=CVS History Page Categories (Foreground)
+CVSHistoryCategory.description=This color is used for the foreground color for all categories diplayed for CVS resources in the history view.
+
+PreferenceKeywords.CVS=CVS Team
+PreferenceKeywords.EXT=CVS Team ext connection method ssh
+PreferenceKeywords.Console=CVS team console colors
+PreferenceKeywords.Annotate=CVS Team Annotate
+
+RepoPreference.Name=CVS Repositories
+RepoPreference.Description=Preferences that contain the CVS repository connection information
+
+CommentTemplatesPreferencePage.name=Comment Templates
+
+FetchAllMembers.label=Expand All
+FetchAllMembers.tooltip=Expand the entire folder in a single round trip
+
+HistoryView.Compare.label = &Compare
+HistoryView.Open.label = &Open
+
+ChangeSets = CVS Change Sets
+newLocation.description = Add a new CVS repository location
+newLocation.name = Add Repository Location \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
new file mode 100644
index 000000000..96515dc1d
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -0,0 +1,1615 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+
+<!-- *************** Synchronize Wizards **************** -->
+ <extension
+ point="org.eclipse.team.ui.synchronizeWizards">
+ <wizard
+ class="org.eclipse.team.internal.ccvs.ui.mappings.ModelSynchronizeWizard"
+ name="%WorkspaceSynchronizeWizard.name"
+ description="%WorkspaceSynchronizeWizard.description"
+ icon="$nl$/icons/full/eview16/cvs_persp.gif"
+ id="org.eclipse.team.cvs.ui.ModelSynchronizeWizard"/>
+ </extension>
+<!-- *************** Console Factory **************** -->
+ <extension
+ point="org.eclipse.ui.console.consoleFactories">
+ <consoleFactory
+ label="%CVS"
+ icon="$nl$/icons/full/eview16/console_view.gif"
+ class="org.eclipse.team.internal.ccvs.ui.console.CVSConsoleFactory"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.team.internal.ccvs.ui.console.CVSConsolePageParticipant"
+ id="org.eclipse.team.internal.ccvs.ui.console.CVSConsolePageParticipant">
+ <enablement>
+ <instanceof value="org.eclipse.team.internal.ccvs.ui.console.CVSOutputConsole"/>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+<!-- *************** Synchronize View Participant **************** -->
+ <extension
+ point="org.eclipse.team.ui.synchronizeParticipants">
+ <participant
+ name="%CVSWorkspaceParticipant"
+ icon="$nl$/icons/full/eview16/cvs_persp.gif"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant"
+ id="org.eclipse.team.cvs.ui.cvsworkspace-participant">
+ </participant>
+ <participant
+ name="%CVSResourceMappingParticipant"
+ icon="$nl$/icons/full/eview16/cvs_persp.gif"
+ class="org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceModelParticipant"
+ id="org.eclipse.team.cvs.ui.workspace-participant">
+ </participant>
+ <participant
+ name="%CVSMergeParticipant"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant"
+ id="org.eclipse.team.cvs.ui.cvsmerge-participant">
+ </participant>
+ <participant
+ persistent="false"
+ name="%CVSCompareParticipant"
+ icon="$nl$/icons/full/eview16/compare_view.gif"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.CompareParticipant"
+ id="org.eclipse.team.cvs.ui.compare-participant">
+ </participant>
+ <participant
+ class="org.eclipse.team.internal.ccvs.ui.mappings.ModelCompareParticipant"
+ icon="$nl$/icons/full/eview16/compare_view.gif"
+ id="org.eclipse.team.cvs.ui.modelCompareParticipant"
+ name="%CVSCompareParticipant"
+ persistent="false"/>
+ <participant
+ class="org.eclipse.team.internal.ccvs.ui.mappings.ModelMergeParticipant"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ id="org.eclipse.team.cvs.ui.modelMergeParticipant"
+ name="%CVSMergeParticipant"
+ persistent="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewer
+ viewerId="org.eclipse.team.cvs.ui.workspaceSynchronization">
+ <popupMenu
+ allowsPlatformContributions="false"
+ id="org.eclipse.team.cvs.ui.workspaceSynchronizationMenu">
+ <insertionPoint name="file"/>
+ <insertionPoint name="file-bottom"/>
+ <insertionPoint name="edit" separator="true"/>
+ <insertionPoint name="synchronize"/>
+ <insertionPoint
+ name="navigate"
+ separator="true"/>
+ <insertionPoint
+ name="update"
+ separator="true"/>
+ <insertionPoint
+ name="commit"
+ separator="false"/>
+ <insertionPoint
+ name="overrideActions"
+ separator="true"/>
+ <insertionPoint
+ name="otherActions1"
+ separator="true"/>
+ <insertionPoint
+ name="otherActions2"
+ separator="true"/>
+ <insertionPoint
+ name="changeSetActions"
+ separator="true"/>
+ <insertionPoint
+ name="sort"
+ separator="true"/>
+ <insertionPoint
+ name="additions"
+ separator="true"/>
+ <insertionPoint
+ name="properties"
+ separator="true"/>
+ </popupMenu>
+ </viewer>
+ <viewer viewerId="org.eclipse.team.cvs.ui.mergeSynchronization">
+ <popupMenu
+ allowsPlatformContributions="false"
+ id="org.eclipse.team.cvs.ui.mergeSynchronizationMenu">
+ <insertionPoint name="file"/>
+ <insertionPoint name="edit" separator="true"/>
+ <insertionPoint name="synchronize"/>
+ <insertionPoint
+ name="navigate"
+ separator="true"/>
+ <insertionPoint
+ name="merge"
+ separator="true"/>
+ <insertionPoint
+ name="other"
+ separator="true"/>
+ <insertionPoint
+ name="otherActions1"
+ separator="true"/>
+ <insertionPoint
+ name="changeSetActions"
+ separator="true"/>
+ <insertionPoint
+ name="sort"
+ separator="true"/>
+ <insertionPoint
+ name="additions"
+ separator="true"/>
+ <insertionPoint
+ name="properties"
+ separator="true"/>
+ </popupMenu>
+ </viewer>
+ <viewer viewerId="org.eclipse.team.cvs.ui.compareSynchronization">
+ <popupMenu
+ allowsPlatformContributions="false"
+ id="org.eclipse.team.cvs.ui.compareSynchronizationMenu">
+ <insertionPoint name="file"/>
+ <insertionPoint name="file-bottom"/>
+ <insertionPoint name="edit"/>
+ <insertionPoint name="synchronize"/>
+ <insertionPoint
+ name="navigate"
+ separator="true"/>
+ <insertionPoint
+ name="merge"
+ separator="true"/>
+ <insertionPoint
+ name="other"
+ separator="true"/>
+ <insertionPoint
+ name="changeSetActions"
+ separator="true"/>
+ <insertionPoint
+ name="sort"
+ separator="true"/>
+ <insertionPoint
+ name="additions"
+ separator="true"/>
+ <insertionPoint
+ name="properties"
+ separator="true"/>
+ </popupMenu>
+ </viewer>
+ </extension>
+
+<!-- *************** Authenticator **************** -->
+ <extension
+ point="org.eclipse.team.cvs.core.authenticator">
+ <authenticator>
+ <run
+ class="org.eclipse.team.internal.ccvs.ui.WorkbenchUserAuthenticator">
+ </run>
+ </authenticator>
+ </extension>
+<!-- *************** CVS File Modification Validator **************** -->
+ <extension
+ point="org.eclipse.team.cvs.core.filemodificationvalidator">
+ <validator>
+ <run
+ class="org.eclipse.team.internal.ccvs.ui.FileModificationValidator">
+ </run>
+ </validator>
+ </extension>
+<!-- ************** Project Sets (for backwards compatibility) **************** -->
+ <extension point="org.eclipse.team.core.projectSets">
+ <projectSets id="org.eclipse.team.cvs.core.cvsnature" class="org.eclipse.team.internal.ccvs.ui.CVSProjectSetSerializer"/>
+ </extension>
+<!-- ******************* Configurationb Wizard ****************** -->
+ <extension
+ point="org.eclipse.team.ui.configurationWizards">
+ <wizard
+ name="%SharingWizard.name"
+ icon="$nl$/icons/full/etool16/newconnect_wiz.gif"
+ class="org.eclipse.team.internal.ccvs.ui.wizards.SharingWizard"
+ id="org.eclipse.team.ccvs.ui.SharingWizard">
+ </wizard>
+ </extension>
+<!-- ************** Property Pages *************** -->
+ <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
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ </page>
+ <page
+ objectClass="org.eclipse.core.resources.IFolder"
+ adaptable="true"
+ name="%CVS"
+ class="org.eclipse.team.internal.ccvs.ui.CVSFolderPropertiesPage"
+ id="org.eclipse.team.ccvs.ui.propertyPages.CVSFolderPropertiesPage">
+ <filter
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ </page>
+ <page
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true"
+ name="%CVS"
+ class="org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage"
+ id="org.eclipse.team.ccvs.ui.propertyPages.CVSProjectPropertiesPage">
+ <filter
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ </page>
+ <page
+ objectClass="org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot"
+ name="%CVS"
+ class="org.eclipse.team.internal.ccvs.ui.repo.CVSRepositoryPropertiesPage"
+ id="org.eclipse.team.ccvs.ui.propertyPages.CVSRepositoryPropertiesPage">
+ </page>
+ <page
+ objectClass="org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot"
+ name="%ServerEncoding"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RepositoryEncodingPropertyPage"
+ id="org.eclipse.team.ccvs.ui.propertyPages.RepositoryEncodingPage">
+ </page>
+ </extension>
+<!-- ******************* Menus ******************** -->
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true"
+ id="org.eclipse.team.ccvs.ui.IFileContributions">
+ <filter
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
+ label="%ShowHistoryAction.label"
+ definitionId="org.eclipse.team.cvs.ui.showHistory"
+ icon="$nl$/icons/full/etool16/history.gif"
+ tooltip="%ShowHistoryAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.showHistory">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ label="%ShowAnnotationAction.label"
+ definitionId="org.eclipse.team.cvs.ui.showAnnotation"
+ icon="$nl$/icons/full/etool16/annotate.gif"
+ tooltip="%ShowAnnotationAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.showAnnotation">
+ </action>
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
+ definitionId="org.eclipse.team.cvs.ui.compareWithRevision"
+ helpContextId="org.eclipse.team.cvs.ui.compare_with_revision_action_context"
+ id="org.eclipse.team.cvs.ui.compareWithRevision"
+ label="%CompareWithRevisionAction.label"
+ menubarPath="compareWithMenu/compareWithGroup"
+ overrideActionId="compareWithHistory"
+ tooltip="%CompareWithRevisionAction.tooltip">
+ </action>
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
+ definitionId="org.eclipse.team.cvs.ui.replaceWithRevision"
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_revision_action_context"
+ id="org.eclipse.team.cvs.ui.replaceWithRevision"
+ label="%ReplaceWithRevisionAction.label"
+ menubarPath="replaceWithMenu/replaceWithGroup"
+ overrideActionId="replaceFromHistory"
+ tooltip="%ReplaceWithRevisionAction.tooltip">
+ </action>
+ <action
+ label="%EditAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.team_edit_action_context"
+ tooltip="%EditAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.EditAction"
+ menubarPath="team.main/group4"
+ id="org.eclipse.team.ccvs.ui.edit">
+ </action>
+ <action
+ label="%UneditAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.team_unedit_action_context"
+ tooltip="%UneditAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UneditAction"
+ menubarPath="team.main/group4"
+ id="org.eclipse.team.ccvs.ui.unedit">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.core.resources.IResource"
+ adaptable="true"
+ id="org.eclipse.team.ccvs.ui.IResourceContributions">
+ <filter
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ <action
+ label="%ShowEditorsAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.team_show_editors_action_context"
+ tooltip="%ShowEditorsAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowEditorsAction"
+ menubarPath="team.main/group4"
+ id="org.eclipse.team.ccvs.ui.showeditors">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.core.resources.mapping.ResourceMapping"
+ adaptable="true"
+ id="org.eclipse.team.ccvs.ui.ResourceMapperContributions">
+ <enablement>
+ <adapt type="org.eclipse.core.resources.mapping.ResourceMapping">
+ <test property="org.eclipse.core.resources.projectPersistentProperty" args="org.eclipse.team.core.repository,org.eclipse.team.cvs.core.cvsnature" />
+ </adapt>
+ </enablement>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
+ label="%SetKeywordSubstitutionAction.label"
+ definitionId="org.eclipse.team.cvs.ui.setKeywordSubstitution"
+ class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
+ tooltip="%SetKeywordSubstitutionAction.tooltip"
+ menubarPath="team.main/group3"
+ id="org.eclipse.team.cvs.ui.setKeywordSubstitution">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_switch_action_context"
+ label="%UpdateActionSwitch.label"
+ definitionId="org.eclipse.team.cvs.ui.updateSwitch"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
+ tooltip="%UpdateActionSwitch.tooltip"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.updateSwitch">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
+ label="%MergeAction.label"
+ definitionId="org.eclipse.team.cvs.ui.merge"
+ tooltip="%MergeAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
+ icon="$nl$/icons/full/obj16/branches_rep.gif"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.merge">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
+ label="%BranchAction.label"
+ definitionId="org.eclipse.team.cvs.ui.branch"
+ tooltip="%BranchAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.branch">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
+ label="%TagAction.label"
+ definitionId="org.eclipse.team.cvs.ui.tag"
+ tooltip="%TagAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
+ icon="$nl$/icons/full/obj16/versions_rep.gif"
+ menubarPath="team.main/group2"
+ id="org.eclipse.team.cvs.ui.tag">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.compare_with_tag_action_context"
+ label="%CompareWithTagAction.label"
+ definitionId="org.eclipse.team.cvs.ui.compareWithTag"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
+ tooltip="%CompareWithTagAction.tooltip"
+ menubarPath="compareWithMenu/compareWithGroup"
+ id="org.eclipse.team.cvs.ui.compareWithTag">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.compare_with_latest_action_context"
+ label="%CompareWithRemoteAction.label"
+ definitionId="org.eclipse.team.cvs.ui.compareWithRemote"
+ tooltip="%CompareWithRemoteAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
+ menubarPath="compareWithMenu/compareWithGroup"
+ id="org.eclipse.team.cvs.ui.compareWithRemote">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_tag_action_context"
+ label="%ReplaceWithTagAction.label"
+ definitionId="org.eclipse.team.cvs.ui.replaceWithTag"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
+ tooltip="%ReplaceWithTagAction.tooltip"
+ menubarPath="replaceWithMenu/replaceWithGroup"
+ id="org.eclipse.team.cvs.ui.replaceWithTag">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_latest_action_context"
+ label="%ReplaceWithAction.label"
+ definitionId="org.eclipse.team.cvs.ui.replace"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
+ tooltip="%ReplaceWithAction.tooltip"
+ menubarPath="replaceWithMenu/replaceWithGroup"
+ id="org.eclipse.team.cvs.ui.replace">
+ </action>
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
+ definitionId="org.eclipse.team.cvs.ui.GenerateDiff"
+ helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
+ id="org.eclipse.team.cvs.ui.GenerateDiff"
+ label="%GenerateDiff.label"
+ menubarPath="team.main/group1"
+ tooltip="%GenerateDiff.tooltip"/>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_update_action_context"
+ label="%UpdateAction.label"
+ definitionId="org.eclipse.team.cvs.ui.update"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
+ tooltip="%UpdateAction.tooltip"
+ menubarPath="team.main/group1"
+ id="org.eclipse.team.ccvs.ui.update">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
+ label="%CommitAction.label"
+ definitionId="org.eclipse.team.cvs.ui.commit"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
+ tooltip="%CommitAction.tooltip"
+ menubarPath="team.main/group1"
+ id="org.eclipse.team.ccvs.ui.commit">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
+ label="%Synchronize.label"
+ tooltip="%Synchronize.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
+ definitionId="org.eclipse.team.cvs.ui.sync"
+ menubarPath="team.main/group1"
+ id="org.eclipse.team.cvs.ui.sync">
+ </action>
+ <action
+ label="%RestoreFromRepositoryAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.team_restore_from_repository_action_context"
+ tooltip="%RestoreFromRepositoryAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.RestoreFromRepositoryAction"
+ menubarPath="team.main/group4"
+ id="org.eclipse.team.ccvs.ui.restoreFromRepository">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
+ label="%IgnoreAction.label"
+ definitionId="org.eclipse.team.cvs.ui.ignore"
+ class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+ tooltip="%IgnoreAction.tooltip"
+ menubarPath="team.main/group3"
+ id="org.eclipse.team.cvs.ui.ignore">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
+ label="%AddAction.label"
+ definitionId="org.eclipse.team.cvs.ui.add"
+ class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
+ tooltip="%AddAction.tooltip"
+ menubarPath="team.main/group3"
+ id="org.eclipse.team.cvs.ui.add">
+ </action>
+ </objectContribution>
+<!-- ************** Project Menu *************** -->
+ <objectContribution
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true"
+ id="org.eclipse.team.ccvs.ui.IProjectContributions">
+ <filter
+ name="projectPersistentProperty"
+ value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
+ </filter>
+ <action
+ label="%UnmanageFolder.label"
+ helpContextId="org.eclipse.team.cvs.ui.team_disconnect_action_context"
+ tooltip="%UnmanageFolder.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UnmanageAction"
+ menubarPath="team.main/projectGroup"
+ id="org.eclipse.team.ccvs.ui.unmanage">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder"
+ id="org.eclipse.team.ccvs.ui.RemoteFolderContributions">
+ <action
+ label="%CheckoutAsAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.checkout_as_action_context"
+ tooltip="%CheckoutAsAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAsAction"
+ menubarPath="checkoutGroup"
+ id="org.eclipse.team.ccvs.ui.checkoutAs">
+ </action>
+ <action
+ label="%CheckoutAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.checkout_as_project_action_context"
+ tooltip="%CheckoutAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAction"
+ menubarPath="checkoutGroup"
+ id="org.eclipse.team.ccvs.ui.checkout">
+ </action>
+ <action
+ label="%ConfigureTags.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
+ tooltip="%ConfigureTags.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteFolder">
+ </action>
+ <action
+ label="%AddToBranch.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.add_to_branch_context"
+ tooltip="%AddToBranch.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.repo.AddToBranchAction"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.addToBranch">
+ </action>
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.actions.FetchAllMembersAction"
+ id="org.eclipse.team.ccvs.ui.fetchAllMembers"
+ label="%FetchAllMembers.label"
+ tooltip="%FetchAllMembers.tooltip"
+ menubarPath="miscGroup"/>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteFile"
+ id="org.eclipse.team.ccvs.ui.RemoteFileContributions">
+ <action
+ label="%OpenRemoteFileAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
+ tooltip="%OpenRemoteFileAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction"
+ id="org.eclipse.team.ccvs.ui.openRemoteFile">
+ </action>
+ <action
+ label="%ShowHistoryAction.label"
+ icon="$nl$/icons/full/etool16/history.gif"
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
+ tooltip="%ShowHistoryAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction"
+ id="org.eclipse.team.ccvs.ui.showHistory">
+ </action>
+ <action
+ label="%ShowAnnotationAction.label"
+ icon="$nl$/icons/full/etool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ tooltip="%ShowAnnotationAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ id="org.eclipse.team.ccvs.ui.showAnnotation">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.core.ILogEntry"
+ id="org.eclipse.team.ccvs.ui.LogEntryContributions">
+ <action
+ label="%OpenLogEntryAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
+ tooltip="%OpenLogEntryAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.OpenLogEntryAction"
+ id="org.eclipse.team.ccvs.ui.openLogEntry">
+ </action>
+ <action
+ label="%CompareRemoteResourcesAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
+ tooltip="%CompareRemoteResourcesAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
+ enablesFor="2"
+ id="org.eclipse.team.ccvs.ui.compareLogEntries">
+ </action>
+ <action
+ label="%ShowAnnotationAction.label"
+ icon="$nl$/icons/full/etool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ tooltip="%ShowAnnotationAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ id="org.eclipse.team.ccvs.ui.showAnnotation">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.ui.model.RemoteModule"
+ id="org.eclipse.team.ccvs.ui.VersionCategoryContributions">
+ <action
+ label="%ConfigureTags.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
+ tooltip="%ConfigureTags.label"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"
+ id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteModule">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot"
+ id="org.eclipse.team.ccvs.ui.RemoteRootContributions">
+ <action
+ label="%CopyRepositoryNameAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.copy_repository_name_action_context"
+ tooltip="%CopyRepositoryNameAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.copyNames">
+ </action>
+ <action
+ label="%RefreshTagsAction.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
+ tooltip="%RefreshTagsAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
+ menubarPath="tagGroup"
+ id="org.eclipse.team.ccvs.ui.refreshTags">
+ </action>
+ <action
+ label="%NewDateTagAction.label"
+ icon="$nl$/icons/full/obj16/date.gif"
+ helpContextId="org.eclipse.team.cvs.ui.new_date_tag_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction"
+ tooltip="%NewDateTagAction.tooltip"
+ menubarPath="group.add/group1"
+ id="org.eclipse.team.ccvs.ui.newDateTag">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.ui.model.DateTagCategory"
+ id="org.eclipse.team.ccvs.ui.DateCategoryContributions">
+ <action
+ label="%NewDateTagAction.label"
+ icon="$nl$/icons/full/obj16/date.gif"
+ helpContextId="org.eclipse.team.cvs.ui.new_date_tag_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction"
+ tooltip="%NewDateTagAction.tooltip"
+ menubarPath="group.add/group1"
+ id="org.eclipse.team.ccvs.ui.newDateTag">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.ui.model.BranchCategory"
+ id="org.eclipse.team.ccvs.ui.model.BranchCategoryContributions">
+ <action
+ label="%RefreshTagsAction.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
+ tooltip="%RefreshTagsAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
+ menubarPath="tagGroup"
+ id="org.eclipse.team.ccvs.ui.refreshTags">
+ </action>
+ </objectContribution>
+ <objectContribution
+ objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteResource"
+ id="org.eclipse.team.ccvs.ui.RemoteResourceContributions">
+ <action
+ label="%CompareRemoteResourcesAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
+ tooltip="%CompareRemoteResourcesAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
+ menubarPath="miscGroup"
+ enablesFor="2"
+ id="org.eclipse.team.ccvs.ui.compareRemoteResources">
+ </action>
+ <action
+ label="%CompareRemoteWithTagAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.compare_remote_with_tag_action_context"
+ tooltip="%CompareRemoteWithTagAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteWithTagAction"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.compareRemoteWithTag">
+ </action>
+ <action
+ label="%MoveTagAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.move_remote_tag_action_context"
+ tooltip="%MoveTagAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.MoveRemoteTagAction"
+ menubarPath="tagGroup"
+ id="org.eclipse.team.ccvs.ui.moveTagInRepository">
+ </action>
+ <action
+ label="%TagInRepositoryAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.tag_remote_action_context"
+ tooltip="%TagInRepositoryAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.TagInRepositoryAction"
+ menubarPath="tagGroup"
+ id="org.eclipse.team.ccvs.ui.tagInRepository">
+ </action>
+ </objectContribution>
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.team.ui.FileRevisionsContribution"
+ objectClass="org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision">
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ icon="$nl$/icons/full/etool16/annotate.gif"
+ id="org.eclipse.team.ccvs.ui.AnnotateRevisionAction"
+ label="%ShowAnnotationAction.label"
+ tooltip="%ShowAnnotationAction.tooltip"/>
+ </objectContribution>
+ </extension>
+
+<!-- ************** Model Element Contributions ********************** -->
+
+<!-- ************** Views ********************** -->
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="%viewCategory"
+ id="org.eclipse.team.ccvs.ui">
+ </category>
+ <view
+ name="%RepositoriesView.name"
+ icon="$nl$/icons/full/eview16/repo_rep.gif"
+ category="org.eclipse.team.ccvs.ui"
+ fastViewWidthRatio="0.5"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView"
+ id="org.eclipse.team.ccvs.ui.RepositoriesView">
+ </view>
+ <view
+ name="%EditorsView.name"
+ icon="$nl$/icons/full/eview16/rep_editors_view.gif"
+ category="org.eclipse.team.ccvs.ui"
+ class="org.eclipse.team.internal.ccvs.ui.EditorsView"
+ id="org.eclipse.team.ccvs.ui.EditorsView">
+ </view>
+ <view
+ name="%AnnotateView.name"
+ icon="$nl$/icons/full/eview16/annotate_view.gif"
+ category="org.eclipse.team.ccvs.ui"
+ class="org.eclipse.team.internal.ccvs.ui.AnnotateView"
+ id="org.eclipse.team.ccvs.ui.AnnotateView">
+ </view>
+ </extension>
+<!-- **************** Preferences ******************* -->
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ label="%PreferenceKeywords.CVS"
+ id="org.eclipse.team.cvs.ui.cvs"/>
+ <keyword
+ label="%PreferenceKeywords.EXT"
+ id="org.eclipse.team.cvs.ui.cvs.ext"/>
+ <keyword
+ label="%PreferenceKeywords.Console"
+ id="org.eclipse.team.cvs.ui.cvs.console"/>
+ <keyword
+ id="org.eclipse.team.cvs.ui.cvs.annotate"
+ label="%PreferenceKeywords.Annotate"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%PreferencePage.name"
+ category="org.eclipse.team.ui.TeamPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.CVSPreferencesPage"
+ id="org.eclipse.team.cvs.ui.CVSPreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%ComparePreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.ComparePreferencePage"
+ id="org.eclipse.team.cvs.ui.ComparePreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%CommentTemplatesPreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.CommentTemplatesPreferencePage"
+ id="org.eclipse.team.cvs.ui.CommentTemplatesPreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%ConsolePreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.console.ConsolePreferencesPage"
+ id="org.eclipse.team.cvs.ui.ConsolePreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs.console"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%DecoratorPreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.CVSDecoratorPreferencesPage"
+ id="org.eclipse.team.cvs.ui.CVSDecoratorPreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%ExtMethodPreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.ExtMethodPreferencePage"
+ id="org.eclipse.team.cvs.ui.ExtMethodPreferencePage">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs.ext"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%WatchEditPreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.WatchEditPreferencePage"
+ id="org.eclipse.team.cvs.ui.WatchEditPreferencePage">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%PasswordManagement"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.PasswordManagementPreferencePage"
+ id="org.eclipse.team.cvs.ui.PasswordManagementPreferencePage">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs.ext"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.UpdateMergePreferencePage"
+ id="org.eclipse.team.cvs.ui.UpdateMergePreferences"
+ name="%UpdateMergePreferencePage.name">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs"/>
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%ProxyPreferencePage.name"
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.ProxyPreferencePage"
+ id="org.eclipse.team.cvs.ui.ProxyPreferencesPreferences">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs.proxy"/>
+ </page>
+ </extension>
+
+
+<!-- **************** Decorator ******************* -->
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ lightweight="true"
+ adaptable="true"
+ location="BOTTOM_RIGHT"
+ label="%DecoratorStandard.name"
+ state="false"
+ class="org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator"
+ id="org.eclipse.team.cvs.ui.decorator">
+ <description>
+ %DecoratorStandard.desc
+ </description>
+ <enablement>
+ <objectClass name="org.eclipse.core.resources.mapping.ResourceMapping"/>
+ </enablement>
+ </decorator>
+ </extension>
+<!-- *************** View Actions **************** -->
+ <extension
+ point="org.eclipse.ui.viewActions">
+ <viewContribution
+ targetID="org.eclipse.team.ccvs.ui.RepositoriesView"
+ id="org.eclipse.team.cvs.ui.repoview_actions">
+ <action
+ label="%CVSActionSet.newLabel"
+ icon="$nl$/icons/full/etool16/newlocation_wiz.gif"
+ tooltip="%CVSActionSet.newTooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.NewRepositoryAction"
+ toolbarPath="actions"
+ definitionId="org.eclipse.team.cvs.ui.addLocation"
+ id="org.eclipse.team.cvs.ui.actions.repoview.NewRepositoryAction">
+ </action>
+ </viewContribution>
+ </extension>
+<!-- **************** CVS Perspective ******************* -->
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%CVSRepositoryExploring"
+ icon="$nl$/icons/full/eview16/cvs_persp.gif"
+ class="org.eclipse.team.internal.ccvs.ui.CVSPerspective"
+ id="org.eclipse.team.cvs.ui.cvsPerspective">
+ <description>
+ %CVSRepositoryExploring.description
+ </description>
+ </perspective>
+ </extension>
+<!-- ************** Perspective Extensions **************** -->
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.ui.resourcePerspective">
+ <perspectiveShortcut
+ id="org.eclipse.team.cvs.ui.cvsPerspective">
+ </perspectiveShortcut>
+ <view
+ relative="org.eclipse.ui.views.TaskList"
+ visible="false"
+ id="org.eclipse.team.ui.GenericHistoryView"
+ relationship="stack">
+ </view>
+ <view
+ relative="org.eclipse.ui.views.ResourceNavigator"
+ visible="false"
+ id="org.eclipse.team.ccvs.ui.RepositoriesView"
+ relationship="stack">
+ </view>
+ <view
+ relative="org.eclipse.ui.views.ResourceNavigator"
+ visible="false"
+ id="org.eclipse.team.ccvs.ui.AnnotateView"
+ relationship="stack">
+ </view>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.team.cvs.ui.cvsPerspective">
+ <actionSet
+ id="org.eclipse.team.cvs.ui.CVSActionSet">
+ </actionSet>
+ <view
+ relative="org.eclipse.team.ccvs.ui.RepositoriesView"
+ id="org.eclipse.team.ccvs.ui.AnnotateView"
+ relationship="stack">
+ </view>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.team.ui.TeamSynchronizingPerspective">
+ <perspectiveShortcut
+ id="org.eclipse.team.cvs.ui.cvsPerspective">
+ </perspectiveShortcut>
+ <view
+ relative="org.eclipse.team.sync.views.SynchronizeView"
+ visible="false"
+ id="org.eclipse.team.ccvs.ui.RepositoriesView"
+ relationship="stack">
+ </view>
+ </perspectiveExtension>
+ </extension>
+<!-- ********** Action Sets ************** -->
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%CVS"
+ description="%CVSActionSet.description"
+ visible="false"
+ id="org.eclipse.team.cvs.ui.CVSActionSet">
+ <action
+ definitionId="org.eclipse.team.cvs.ui.checkout"
+ label="%CVSActionSet.checkoutLabel"
+ icon="$nl$/icons/full/etool16/newconnect_wiz.gif"
+ tooltip="%CVSActionSet.checkoutTooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutWizardAction"
+ toolbarPath="Normal/CVS"
+ id="org.eclipse.team.cvs.ui.actions.CheckoutAction">
+ </action>
+ <menu
+ label="%CVS"
+ path="additions"
+ id="cvs.main">
+ <separator
+ name="group1">
+ </separator>
+ <separator
+ name="group2">
+ </separator>
+ <separator
+ name="group3">
+ </separator>
+ <separator
+ name="group4">
+ </separator>
+ <separator
+ name="group5">
+ </separator>
+ <separator
+ name="group6">
+ </separator>
+ <separator
+ name="group7">
+ </separator>
+ <separator
+ name="group8">
+ </separator>
+ <separator
+ name="group9">
+ </separator>
+ <separator
+ name="group10">
+ </separator>
+ <separator
+ name="projectGroup">
+ </separator>
+ </menu>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
+ label="%IgnoreAction.label"
+ definitionId="org.eclipse.team.cvs.ui.ignore"
+ class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+ tooltip="%IgnoreAction.tooltip"
+ menubarPath="cvs.main/group3"
+ id="org.eclipse.team.cvs.ui.ignore">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
+ label="%AddAction.label"
+ definitionId="org.eclipse.team.cvs.ui.add"
+ class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
+ tooltip="%AddAction.tooltip"
+ menubarPath="cvs.main/group3"
+ id="org.eclipse.team.cvs.ui.add">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
+ label="%ShowHistoryAction.label"
+ definitionId="org.eclipse.team.cvs.ui.showHistory"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
+ icon="$nl$/icons/full/eview16/history_view.gif"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.showHistory">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ label="%ShowAnnotationAction.label"
+ definitionId="org.eclipse.team.cvs.ui.showAnnotation"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
+ icon="$nl$/icons/full/etool16/annotate.gif"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.showAnnotation">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
+ label="%SetKeywordSubstitutionAction.label"
+ definitionId="org.eclipse.team.cvs.ui.setKeywordSubstitution"
+ class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
+ tooltip="%SetKeywordSubstitutionAction.tooltip"
+ menubarPath="cvs.main/group3"
+ id="org.eclipse.team.cvs.ui.setKeywordSubstitution">
+ </action>
+ <action
+ label="%UpdateActionSwitch.label"
+ definitionId="org.eclipse.team.cvs.ui.updateSwitch"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
+ tooltip="%UpdateActionSwitch.tooltip"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.updateSwitch">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
+ label="%MergeAction.label"
+ icon="$nl$/icons/full/obj16/branches_rep.gif"
+ tooltip="%MergeAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
+ definitionId="org.eclipse.team.cvs.ui.merge"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.merge">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
+ label="%BranchAction.label"
+ icon="$nl$/icons/full/elcl16/newstream_wiz.gif"
+ tooltip="%BranchAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+ definitionId="org.eclipse.team.cvs.ui.branch"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.branch">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
+ label="%TagAction.label"
+ icon="$nl$/icons/full/obj16/versions_rep.gif"
+ tooltip="%TagAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
+ definitionId="org.eclipse.team.cvs.ui.tag"
+ menubarPath="cvs.main/group2"
+ id="org.eclipse.team.cvs.ui.tag">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
+ label="%GenerateDiff.label"
+ definitionId="org.eclipse.team.cvs.ui.GenerateDiff"
+ class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
+ tooltip="%GenerateDiff.tooltip"
+ menubarPath="cvs.main/group1"
+ id="org.eclipse.team.cvs.ui.GenerateDiff">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_update_action_context"
+ label="%UpdateAction.label"
+ tooltip="%UpdateAction.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
+ definitionId="org.eclipse.team.cvs.ui.update"
+ menubarPath="cvs.main/group1"
+ id="org.eclipse.team.cvs.ui.update">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
+ allowLabelUpdate="false"
+ retarget="false"
+ label="%CommitAction.label"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
+ definitionId="org.eclipse.team.cvs.ui.commit"
+ tooltip="%CommitAction.tooltip"
+ menubarPath="cvs.main/group1"
+ id="org.eclipse.team.cvs.ui.commit">
+ </action>
+ <action
+ helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
+ label="%Synchronize.label"
+ tooltip="%Synchronize.tooltip"
+ class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
+ definitionId="org.eclipse.team.ui.synchronizeLast"
+ menubarPath="cvs.main/group1"
+ id="org.eclipse.team.cvs.ui.sync">
+ </action>
+ </actionSet>
+ </extension>
+<!-- ******************* Action Definitions ******************** -->
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="%CVSActionSet.categoryName"
+ description="%CVSActionSet.description"
+ id="org.eclipse.team.cvs.ui.actionSet">
+ </category>
+ <!-- Perspective/View Commands -->
+ <command
+ description="%CVSRepositoryExploring.openPerspectiveDescription"
+ categoryId="org.eclipse.ui.category.perspectives"
+ name="%CVSRepositoryExploring"
+ id="org.eclipse.team.cvs.ui.cvsPerspective"/>
+ <command
+ name="%ViewCommand.repositoriesView.name"
+ description="%ViewCommand.repositoriesView.description"
+ categoryId="org.eclipse.ui.category.views"
+ id="org.eclipse.team.ccvs.ui.RepositoriesView"/>
+ <command
+ name="%ViewCommand.editorsView.name"
+ description="%ViewCommand.editorsView.description"
+ categoryId="org.eclipse.ui.category.views"
+ id="org.eclipse.team.ccvs.ui.EditorsView"/>
+ <command
+ name="%ViewCommand.annotateView.name"
+ description="%ViewCommand.annotateView.description"
+ categoryId="org.eclipse.ui.category.views"
+ id="org.eclipse.team.ccvs.ui.AnnotateView"/>
+ <!-- CVS View Actions -->
+ <command
+ name="%newLocation.name"
+ description="%newLocation.description"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ id="org.eclipse.team.cvs.ui.addLocation"/>
+ <!-- CVS Menu Commands -->
+ <command
+ name="%CVSActionSet.checkoutLabel"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ description="%CVSActionSet.checkoutTooltip"
+ id="org.eclipse.team.cvs.ui.checkout">
+ </command>
+ <command
+ description="%CommitAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%CommitAction.name"
+ id="org.eclipse.team.cvs.ui.commit"/>
+ <command
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ description="%ReplaceWithAction.tooltip"
+ name="%ReplaceWithAction.name"
+ id="org.eclipse.team.cvs.ui.replace"/>
+ <command
+ description="%ReplaceWithTagAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%ReplaceWithTagAction.name"
+ id="org.eclipse.team.cvs.ui.replaceWithTag"/>
+ <command
+ description="%ReplaceWithRevisionAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%ReplaceWithRevisionAction.name"
+ id="org.eclipse.team.cvs.ui.replaceWithRevision"/>
+ <command
+ description="%CompareWithRemoteAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%CompareWithRemoteAction.name"
+ id="org.eclipse.team.cvs.ui.compareWithRemote"/>
+ <command
+ description="%CompareWithTagAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%CompareWithTagAction.name"
+ id="org.eclipse.team.cvs.ui.compareWithTag"/>
+ <command
+ description="%CompareWithRevisionAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%CompareWithRevisionAction.name"
+ id="org.eclipse.team.cvs.ui.compareWithRevision"/>
+ <command
+ description="%UpdateAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%UpdateAction.name"
+ id="org.eclipse.team.cvs.ui.update"/>
+ <command
+ description="%GenerateDiff.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%GenerateDiff.name"
+ id="org.eclipse.team.cvs.ui.GenerateDiff"/>
+ <command
+ description="%TagAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%TagAction.name"
+ id="org.eclipse.team.cvs.ui.tag"/>
+ <command
+ description="%BranchAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%BranchAction.name"
+ id="org.eclipse.team.cvs.ui.branch"/>
+ <command
+ description="%MergeAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%MergeAction.name"
+ id="org.eclipse.team.cvs.ui.merge"/>
+ <command
+ description="%UpdateActionSwitch.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%UpdateActionSwitch.name"
+ id="org.eclipse.team.cvs.ui.updateSwitch"/>
+ <command
+ description="%SetKeywordSubstitutionAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%SetKeywordSubstitutionAction.name"
+ id="org.eclipse.team.cvs.ui.setKeywordSubstitution"/>
+ <command
+ description="%ShowAnnotationAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%ShowAnnotationAction.name"
+ id="org.eclipse.team.cvs.ui.showAnnotation"/>
+ <command
+ description="%ShowHistoryAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%ShowHistoryAction.name"
+ id="org.eclipse.team.cvs.ui.showHistory"/>
+ <command
+ description="%AddAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%AddAction.name"
+ id="org.eclipse.team.cvs.ui.add"/>
+ <command
+ description="%IgnoreAction.tooltip"
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ name="%IgnoreAction.name"
+ id="org.eclipse.team.cvs.ui.ignore"/>
+ <command
+ categoryId="org.eclipse.team.cvs.ui.actionSet"
+ description="%Synchronize.tooltip"
+ name="%Synchronize.name"
+ id="org.eclipse.team.cvs.ui.sync"/>
+ </extension>
+
+ <!-- Commented out awaiting menu support from UI
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
+ commandId="org.eclipse.team.cvs.ui.commit"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.ignore"
+ class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.add"
+ class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.showHistory"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.showAnnotation"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.setKeywordSubstitution"
+ class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.updateSwitch"
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
+ commandId="org.eclipse.team.cvs.ui.merge"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+ commandId="org.eclipse.team.cvs.ui.branch"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
+ commandId="org.eclipse.team.cvs.ui.tag"/>
+ <handler
+ commandId="org.eclipse.team.cvs.ui.GenerateDiff"
+ class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
+ commandId="org.eclipse.team.cvs.ui.update"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutWizardAction"
+ commandId="org.eclipse.team.cvs.ui.checkout"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
+ commandId="org.eclipse.team.cvs.ui.compareWithRevision"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
+ commandId="org.eclipse.team.cvs.ui.compareWithTag"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
+ commandId="org.eclipse.team.cvs.ui.compareWithRemote"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
+ commandId="org.eclipse.team.cvs.ui.replaceWithTag"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
+ commandId="org.eclipse.team.cvs.ui.replaceWithRevision"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
+ commandId="org.eclipse.team.cvs.ui.replace"/>
+ <handler
+ class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
+ commandId="org.eclipse.team.cvs.ui.sync"/>
+ </extension>
+ -->
+
+<!-- ********** Color and Font Definitions ************** -->
+ <extension point="org.eclipse.ui.themes">
+ <themeElementCategory
+ id="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%CVS"/>
+ <fontDefinition
+ label="%CVSConsoleFont.label"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ defaultsTo="org.eclipse.jface.textfont"
+ id="pref_console_font">
+ <description>
+ %CVSConsoleFont.description
+ </description>
+ </fontDefinition>
+ <colorDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_foreground_color"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%OutgoingChangeForegroundColor.label"
+ value="COLOR_LIST_FOREGROUND">
+ <description>
+ %OutgoingChangeForegroundColor.description
+ </description>
+ </colorDefinition>
+ <colorDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_background_color"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%OutgoingChangeBackgroundColor.label"
+ value="COLOR_LIST_BACKGROUND">
+ <description>
+ %OutgoingChangeBackgroundColor.description
+ </description>
+ </colorDefinition>
+ <fontDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.outgoing_change_font"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%OutgoingChangeFont.label">
+ <description>
+ %OutgoingChangeFont.description
+ </description>
+ </fontDefinition>
+ <colorDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_foreground_color"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%IgnoredResourceForegroundColor.label"
+ value="COLOR_LIST_FOREGROUND">
+ <description>
+ %IgnoredResourceForegroundColor.description
+ </description>
+ </colorDefinition>
+ <colorDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_background_color"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%IgnoredResourceBackgroundColor.label"
+ value="COLOR_LIST_BACKGROUND">
+ <description>
+ %IgnoredResourceBackgroundColor.description
+ </description>
+ </colorDefinition>
+ <fontDefinition
+ id="org.eclipse.team.cvs.ui.fontsandcolors.ignored_resource_font"
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ label="%IgnoredResourceFont.label">
+ <description>
+ %IgnoredResourceFont.description
+ </description>
+ </fontDefinition>
+ <colorDefinition
+ categoryId="org.eclipse.team.cvs.ui.fontsandcolors"
+ id="org.eclipse.team.cvs.ui.fontsandcolors.cvshistorypagecategories"
+ label="%CVSHistoryCategory.label"
+ value="COLOR_LIST_FOREGROUND">
+ <description>
+ %CVSHistoryCategory.description
+ </description>
+ </colorDefinition>
+</extension>
+
+<!-- ********** QuickDiff text editor support ************** -->
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.quickDiffReferenceProvider">
+ <referenceprovider
+ label="%CVSRemoteQuickDiffProvider.label"
+ class="org.eclipse.team.internal.ccvs.ui.RemoteRevisionQuickDiffProvider"
+ id="org.eclipse.quickdiff.providers.CVSReferenceProvider">
+ </referenceprovider>
+ </extension>
+
+<!-- ********** New Project Wizard ************** -->
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category name="%newWizardCategoryName" id="org.eclipse.team.cvs.ui.newWizards">
+ </category>
+ <wizard
+ category="org.eclipse.team.cvs.ui.newWizards"
+ icon="$nl$/icons/full/etool16/newconnect_wiz.gif"
+ name="%newProjectCheckoutWizard"
+ class="org.eclipse.team.internal.ccvs.ui.wizards.CheckoutWizard"
+ project="true"
+ id="org.eclipse.team.cvs.ui.newProjectCheckout">
+ <description>
+ %newProjectCheckoutWizardDescription2
+ </description>
+ </wizard>
+ <wizard
+ category="org.eclipse.team.cvs.ui.newWizards"
+ icon="$nl$/icons/full/etool16/newlocation_wiz.gif"
+ name="%newLocationWizard"
+ class="org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard"
+ project="false"
+ id="org.eclipse.team.cvs.ui.newLocation">
+ <description>
+ %newLocationWizardDescription
+ </description>
+ </wizard>
+ </extension>
+
+ <!-- ********** Import Wizard ************** -->
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <category name="%newWizardCategoryName" id="org.eclipse.team.cvs.ui.importWizards">
+ </category>
+ <wizard
+ icon="$nl$/icons/full/obj16/import_obj.gif"
+ name="%newProjectCheckoutWizard"
+ class="org.eclipse.team.internal.ccvs.ui.wizards.ImportWizard"
+ category="org.eclipse.team.cvs.ui.importWizards"
+ id="org.eclipse.team.cvs.ui.newProjectCheckout">
+ <description>
+ %newProjectCheckoutWizardDescription
+ </description>
+ </wizard>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferenceTransfer">
+ <transfer
+ id="org.eclipse.cvs.ui.transfer.repos"
+ icon="$nl$/icons/full/obj16/repository_rep.gif"
+ name="%RepoPreference.Name">
+ <mapping scope="instance">
+ <entry node="org.eclipse.team.cvs.core/repositories"/>
+ </mapping>
+ <description>
+ %RepoPreference.Description
+ </description>
+ </transfer>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.filehistory.CVSFileHistoryProvider"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.ICVSRemoteFile"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.filehistory.CVSLocalFileRevision"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.history.IHistoryPageSource"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.team.internal.ccvs.core.CVSTeamProviderType"
+ class="org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory">
+ <adapter type="org.eclipse.team.ui.mapping.ITeamStateProvider"/>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.team.ui.teamDecorators">
+ <teamDecorator
+ decoratedDirection="OUTGOING"
+ decoratorId="org.eclipse.team.cvs.ui.decorator"
+ repositoryId="org.eclipse.team.cvs.core.cvsnature"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.dropActions">
+ <action
+ class="org.eclipse.team.internal.ccvs.ui.CVSResourceDropAdapter"
+ id="org.eclipse.team.cvs.ui.cvsRemoteDrop"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="false"
+ contentProvider="org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetContentProvider"
+ icon="$nl$/icons/full/obj16/changelog_obj.gif"
+ id="org.eclipse.team.cvs.ui.changeSetContent"
+ labelProvider="org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetLabelProvider"
+ name="%ChangeSets"
+ priority="normal">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.team.internal.ccvs.core.mapping.ChangeSetModelProvider"/>
+ <instanceof value="org.eclipse.team.internal.ccvs.core.mapping.CVSActiveChangeSet"/>
+ <instanceof value="org.eclipse.team.internal.ccvs.core.mapping.CVSCheckedInChangeSet"/>
+ <instanceof value="org.eclipse.core.resources.IResource"/>
+ </or>
+ </enablement>
+ <commonSorter
+ class="org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetSorter"
+ id="org.eclipse.team.cvs.ui.changeSetSorter"/>
+ <actionProvider
+ class="org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetActionProvider"
+ id="org.eclipse.team.cvs.ui.changeSetActions"/>
+ </navigatorContent>
+ </extension>
+ <extension
+ point="org.eclipse.team.ui.teamContentProviders">
+ <teamContentProvider
+ contentExtensionId="org.eclipse.team.cvs.ui.changeSetContent"
+ icon="$nl$/icons/full/obj16/changelog_obj.gif"
+ modelProviderId="org.eclipse.team.cvs.core.changeSetModel"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.team.cvs.ui.CVSPreferences"
+ class="org.eclipse.team.internal.ccvs.ui.AnnotatePreferencePage"
+ id="org.eclipse.team.cvs.ui.AnnotatePreferences"
+ name="%AnnotatePreferencePage.name">
+ <keywordReference id="org.eclipse.team.cvs.ui.cvs.annotate"/>
+ </page>
+ </extension>
+
+</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java
new file mode 100644
index 000000000..e07d32fd6
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java
@@ -0,0 +1,382 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ccvs.core.*;
+import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ui.history.GenericHistoryView;
+import org.eclipse.team.ui.history.IHistoryPage;
+import org.eclipse.team.ui.history.IHistoryView;
+import org.eclipse.ui.*;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.registry.EditorDescriptor;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * A view showing the results of the CVS Annotate Command. A linked
+ * combination of a View of annotations, a source editor and the
+ * Resource History View
+ */
+public class AnnotateView extends ViewPart implements ISelectionChangedListener {
+
+ ITextEditor editor;
+ GenericHistoryView historyView;
+ IWorkbenchPage page;
+
+ ListViewer viewer;
+ IDocument document;
+ Collection cvsAnnotateBlocks;
+ ICVSResource cvsResource;
+ InputStream contents;
+
+ IStructuredSelection previousListSelection;
+ ITextSelection previousTextSelection;
+ boolean lastSelectionWasText = false;
+
+
+ public static final String VIEW_ID = "org.eclipse.team.ccvs.ui.AnnotateView"; //$NON-NLS-1$
+ private Composite top;
+
+ private IPartListener partListener = new IPartListener() {
+ public void partActivated(IWorkbenchPart part) {
+ }
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+ public void partClosed(IWorkbenchPart part) {
+ if (editor != null && part == editor) {
+ disconnect();
+ }
+ }
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+ public void partOpened(IWorkbenchPart part) {
+ }
+ };
+
+ public AnnotateView() {
+ super();
+ }
+
+ public void createPartControl(Composite parent) {
+
+ this.top = parent;
+
+ // Create default contents
+ Label label = new Label(top, SWT.WRAP);
+ label.setText(CVSUIMessages.CVSAnnotateView_viewInstructions);
+ top.layout();
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(label, IHelpContextIds.ANNOTATE_VIEW);
+ }
+
+ /**
+ * Show the annotation view.
+ * @param cvsResource
+ * @param cvsAnnotateBlocks
+ * @param contents
+ * @throws PartInitException, CVSException
+ */
+ public void showAnnotations(ICVSResource cvsResource, Collection cvsAnnotateBlocks, InputStream contents) throws PartInitException, CVSException {
+ showAnnotations(cvsResource, cvsAnnotateBlocks, contents, true);
+ }
+
+ /**
+ * Show the annotation view.
+ * @param cvsResource
+ * @param cvsAnnotateBlocks
+ * @param contents
+ * @param useHistoryView
+ * @throws PartInitException, CVSException
+ */
+ public void showAnnotations(ICVSResource cvsResource, Collection cvsAnnotateBlocks, InputStream contents, boolean useHistoryView) throws PartInitException, CVSException {
+
+ // Disconnect from old annotation editor
+ disconnect();
+
+ // Remove old viewer
+ Control[] oldChildren = top.getChildren();
+ if (oldChildren != null) {
+ for (int i = 0; i < oldChildren.length; i++) {
+ oldChildren[i].dispose();
+ }
+ }
+
+ viewer = new ListViewer(top, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
+ viewer.setContentProvider(new ArrayContentProvider());
+ viewer.setLabelProvider(new LabelProvider());
+ viewer.addSelectionChangedListener(this);
+ viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), IHelpContextIds.ANNOTATE_VIEW);
+
+ top.layout();
+
+ this.cvsResource = cvsResource;
+ this.contents = contents;
+ this.cvsAnnotateBlocks = cvsAnnotateBlocks;
+ page = CVSUIPlugin.getActivePage();
+ viewer.setInput(cvsAnnotateBlocks);
+ editor = (ITextEditor) openEditor();
+ IDocumentProvider provider = editor.getDocumentProvider();
+ document = provider.getDocument(editor.getEditorInput());
+
+ setPartName(NLS.bind(CVSUIMessages.CVSAnnotateView_showFileAnnotation, (new Object[] {cvsResource.getName()})));
+ IResource localResource = cvsResource.getIResource();
+ if (localResource != null) {
+ setTitleToolTip(localResource.getFullPath().toString());
+ } else {
+ setTitleToolTip(cvsResource.getName());
+ }
+
+ if (!useHistoryView) {
+ return;
+ }
+
+ // Get hook to the HistoryView
+
+ historyView = (GenericHistoryView) page.showView(IHistoryView.VIEW_ID);
+ historyView.showHistoryFor((ICVSRemoteFile) CVSWorkspaceRoot.getRemoteResourceFor(cvsResource));
+ }
+
+ protected void disconnect() {
+ if(editor != null) {
+ if (editor.getSelectionProvider() instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) editor.getSelectionProvider()).removePostSelectionChangedListener(this);
+ }
+ editor.getSite().getPage().removePartListener(partListener);
+ editor = null;
+ document = null;
+ }
+ }
+
+ /**
+ * Makes the view visible in the active perspective. If there
+ * isn't a view registered <code>null</code> is returned.
+ * Otherwise the opened view part is returned.
+ */
+ public static AnnotateView openInActivePerspective() throws PartInitException {
+ return (AnnotateView) CVSUIPlugin.getActivePage().showView(VIEW_ID);
+ }
+
+ /**
+ * Selection changed in either the Annotate List View or the
+ * Source editor.
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+
+ if (event.getSelection() instanceof IStructuredSelection) {
+ listSelectionChanged((IStructuredSelection) event.getSelection());
+ } else if (event.getSelection() instanceof ITextSelection) {
+ textSelectionChanged((ITextSelection) event.getSelection());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#dispose()
+ */
+ public void dispose() {
+ disconnect();
+ }
+
+ /**
+ * A selection event in the Annotate Source Editor
+ * @param event
+ */
+ private void textSelectionChanged(ITextSelection selection) {
+
+ // Track where the last selection event came from to avoid
+ // a selection event loop.
+ lastSelectionWasText = true;
+
+ // Locate the annotate block containing the selected line number.
+ CVSAnnotateBlock match = null;
+ for (Iterator iterator = cvsAnnotateBlocks.iterator(); iterator.hasNext();) {
+ CVSAnnotateBlock block = (CVSAnnotateBlock) iterator.next();
+ if (block.contains(selection.getStartLine())) {
+ match = block;
+ break;
+ }
+ }
+
+ // Select the annotate block in the List View.
+ if (match == null) {
+ return;
+ }
+
+ StructuredSelection listSelection = new StructuredSelection(match);
+ viewer.setSelection(listSelection, true);
+ }
+
+ /**
+ * A selection event in the Annotate List View
+ * @param selection
+ */
+ private void listSelectionChanged(IStructuredSelection selection) {
+
+ // If the editor was closed, reopen it.
+ if (editor == null || editor.getSelectionProvider() == null) {
+ try {
+ contents.reset();
+ showAnnotations(cvsResource, cvsAnnotateBlocks, contents, false);
+ } catch (CVSException e) {
+ return;
+ } catch (PartInitException e) {
+ return;
+ } catch (IOException e) {
+ return;
+ }
+ }
+
+ ISelectionProvider selectionProvider = editor.getSelectionProvider();
+ if (selectionProvider == null) {
+ // Failed to open the editor but what else can we do.
+ return;
+ }
+
+ ITextSelection textSelection = (ITextSelection) selectionProvider.getSelection();
+ if (textSelection == null) return;
+
+ if (selection.size() == 1 && !(selection.getFirstElement() instanceof CVSAnnotateBlock))
+ return;
+
+ CVSAnnotateBlock listSelection = (CVSAnnotateBlock) selection.getFirstElement();
+ if (listSelection == null) return;
+
+ /**
+ * Ignore event if the current text selection is already equal to the corresponding
+ * list selection. Nothing to do. This prevents infinite event looping.
+ *
+ * Extra check to handle single line deltas
+ */
+
+ if (textSelection.getStartLine() == listSelection.getStartLine() && textSelection.getEndLine() == listSelection.getEndLine() && selection.equals(previousListSelection)) {
+ return;
+ }
+
+ // If the last selection was a text selection then bale to prevent a selection loop.
+ if (!lastSelectionWasText) {
+ try {
+ int start = document.getLineOffset(listSelection.getStartLine());
+ int end = document.getLineOffset(listSelection.getEndLine() + 1);
+ editor.selectAndReveal(start, end - start);
+ if (editor != null && !page.isPartVisible(editor)) {
+ page.activate(editor);
+ }
+
+ } catch (BadLocationException e) {
+ // Ignore - nothing we can do.
+ }
+ }
+
+
+ // Select the revision in the history view.
+ if(historyView != null) {
+ IHistoryPage historyPage = historyView.getHistoryPage();
+ if (historyPage instanceof CVSHistoryPage){
+ ((CVSHistoryPage) historyPage).selectRevision(listSelection.getRevision());
+ lastSelectionWasText = false;
+ }
+ }
+ }
+
+ /**
+ * Try and open the correct registered editor type for the file.
+ * @throws CVSException, PartInitException
+ */
+ private IEditorPart openEditor() throws CVSException, PartInitException {
+ ICVSRemoteFile file = (ICVSRemoteFile) CVSWorkspaceRoot.getRemoteResourceFor(cvsResource);
+
+ // Determine if the registered editor is an ITextEditor.
+ // There is currently no support from UI to determine this information. This
+ // problem has been logged in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=47362
+ // For now, use internal classes.
+ String id = getEditorId(file);
+ ITextEditor editor = getEditor(id, file);
+
+ // Hook Editor post selection listener.
+ if (editor.getSelectionProvider() instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) editor.getSelectionProvider()).addPostSelectionChangedListener(this);
+ }
+ editor.getSite().getPage().addPartListener(partListener);
+ return editor;
+ }
+
+ private ITextEditor getEditor(String id, ICVSRemoteFile file) throws PartInitException {
+ // Either reuse an existing editor or open a new editor of the correct type.
+ if (editor != null && editor instanceof IReusableEditor && page.isPartVisible(editor) && editor.getSite().getId().equals(id)) {
+ // We can reuse the editor
+ ((IReusableEditor) editor).setInput(new RemoteAnnotationEditorInput(file, contents));
+ return editor;
+ } else {
+ // We can not reuse the editor so close the existing one and open a new one.
+ if (editor != null) {
+ page.closeEditor(editor, false);
+ editor = null;
+ }
+ IEditorPart part = page.openEditor(new RemoteAnnotationEditorInput(file, contents), id);
+ if (part instanceof ITextEditor) {
+ return (ITextEditor)part;
+ } else {
+ // We asked for a text editor but didn't get one
+ // so open a vanilla text editor
+ page.closeEditor(part, false);
+ part = page.openEditor(new RemoteAnnotationEditorInput(file, contents), IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
+ if (part instanceof ITextEditor) {
+ return (ITextEditor)part;
+ } else {
+ // There is something really wrong so just bail
+ throw new PartInitException(CVSUIMessages.AnnotateView_0);
+ }
+ }
+ }
+ }
+
+ private String getEditorId(ICVSRemoteFile file) {
+ String id;
+ IEditorRegistry registry = CVSUIPlugin.getPlugin().getWorkbench().getEditorRegistry();
+ IEditorDescriptor descriptor = registry.getDefaultEditor(file.getName());
+ if (descriptor == null || !(descriptor instanceof EditorDescriptor) || !(((EditorDescriptor)descriptor).isInternal())) {
+ id = IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID;
+ } else {
+ try {
+ Object obj = IDEWorkbenchPlugin.createExtension(((EditorDescriptor) descriptor).getConfigurationElement(), "class"); //$NON-NLS-1$
+ if (obj instanceof ITextEditor) {
+ id = descriptor.getId();
+ } else {
+ id = IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID;
+ }
+ } catch (CoreException e) {
+ id = IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID;
+ }
+ }
+ return id;
+ }
+
+ // This method implemented to be an ISelectionChangeListener but we
+ // don't really care when the List or Editor get focus.
+ public void setFocus() {
+ return;
+ }
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
new file mode 100644
index 000000000..41d25e949
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
@@ -0,0 +1,1740 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.team.internal.ccvs.ui;
+
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
+import org.eclipse.core.resources.mapping.ResourceChangeValidator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.*;
+import org.eclipse.jface.util.IOpenEventListener;
+import org.eclipse.jface.util.OpenStrategy;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.history.*;
+import org.eclipse.team.internal.ccvs.core.*;
+import org.eclipse.team.internal.ccvs.core.client.Command;
+import org.eclipse.team.internal.ccvs.core.client.Update;
+import org.eclipse.team.internal.ccvs.core.filehistory.*;
+import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
+import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
+import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
+import org.eclipse.team.internal.ccvs.ui.actions.MoveRemoteTagAction;
+import org.eclipse.team.internal.ccvs.ui.operations.*;
+import org.eclipse.team.internal.core.history.LocalFileRevision;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.actions.CompareRevisionAction;
+import org.eclipse.team.internal.ui.actions.OpenRevisionAction;
+import org.eclipse.team.internal.ui.history.*;
+import org.eclipse.team.ui.history.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.util.Calendar;
+
+public class CVSHistoryPage extends HistoryPage implements IAdaptable, IHistoryCompareAdapter {
+
+ /* private */ ICVSFile file;
+ /* private */ ICVSFile previousFile;
+ /* private */ IFileRevision currentFileRevision;
+
+ // cached for efficiency
+ /* private */ CVSFileHistory cvsFileHistory;
+ /* private */IFileRevision[] entries;
+
+ protected CVSHistoryTableProvider historyTableProvider;
+
+ /* private */TreeViewer treeViewer;
+ protected TextViewer textViewer;
+ protected TableViewer tagViewer;
+
+ /* private */CompareRevisionAction compareAction;
+ /* private */OpenRevisionAction openAction;
+
+ private CVSHistoryFilterAction cvsHistoryFilter;
+ private IAction toggleTextAction;
+ private IAction toggleTextWrapAction;
+ private IAction toggleListAction;
+ private IAction toggleFilterAction;
+ private IAction toggleSearchAction;
+ private TextViewerAction copyAction;
+ private TextViewerAction selectAllAction;
+ private Action getContentsAction;
+ private Action getRevisionAction;
+ private Action refreshAction;
+
+ private Action tagWithExistingAction;
+ private Action localMode;
+ private Action remoteMode;
+ private Action remoteLocalMode;
+ private Action groupByDateMode;
+ private Action collapseAll;
+ private Action compareModeAction;
+
+ private SashForm sashForm;
+ private SashForm innerSashForm;
+ private SashForm searchSashForm;
+
+ private Image branchImage;
+ private Image versionImage;
+
+ protected IFileRevision currentSelection;
+
+ protected RefreshCVSFileHistory refreshCVSFileHistoryJob;
+
+ /* private */boolean shutdown = false;
+
+ boolean localFilteredOut = false;
+ boolean remoteFilteredOut = false;
+
+ private HistoryResourceListener resourceListener;
+
+ //toggle constants for default click action
+ private boolean compareMode = false;
+
+ //filter constants
+ public final static int REMOTE_LOCAL_MODE = 0;
+ public final static int REMOTE_MODE = 1;
+ public final static int LOCAL_MODE = 2;
+
+ //current filter mode
+ private int currentFilerMode = 0;
+
+ //text field used for search
+ private Text searchField;
+
+ //grouping on
+ private boolean groupingOn;
+ private CVSHistoryFilter historyFilter;
+ private CVSHistorySearchFilter searchFilter;
+
+ public CVSHistoryPage(Object object) {
+ this.file = getCVSFile(object);
+ }
+
+ public void createControl(Composite parent) {
+ initializeImages();
+
+ sashForm = new SashForm(parent, SWT.VERTICAL);
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ treeViewer = createTree(sashForm);
+ innerSashForm = new SashForm(sashForm, SWT.HORIZONTAL);
+ tagViewer = createTagTable(innerSashForm);
+ textViewer = createText(innerSashForm);
+
+ searchSashForm = new SashForm(sashForm, SWT.HORIZONTAL);
+ //Find field
+ searchField = new Text(searchSashForm, SWT.BORDER);
+ searchField.setText(CVSUIMessages.CVSHistoryPage_EnterSearchTerm);
+ final SearchHistoryTable searchHistoryTable = new SearchHistoryTable();
+ searchField.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e){
+ Display.getDefault().timerExec(1000, searchHistoryTable);
+ }
+ });
+
+ sashForm.setWeights(new int[] {65, 20, 15});
+ innerSashForm.setWeights(new int[] {50, 50});
+
+ contributeActions();
+
+ setViewerVisibility();
+
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ if (parentSite != null && parentSite instanceof DialogHistoryPageSite && treeViewer != null)
+ parentSite.setSelectionProvider(treeViewer);
+
+ resourceListener = new HistoryResourceListener();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ private TextViewer createText(SashForm parent) {
+ TextViewer result = new TextViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
+ result.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ copyAction.update();
+ }
+ });
+ return result;
+ }
+
+ private TableViewer createTagTable(SashForm parent) {
+ Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
+ TableViewer result = new TableViewer(table);
+ TableLayout layout = new TableLayout();
+ layout.addColumnData(new ColumnWeightData(100));
+ table.setLayout(layout);
+ result.setContentProvider(new SimpleContentProvider() {
+ public Object[] getElements(Object inputElement) {
+ if (inputElement == null)
+ return new Object[0];
+ ITag[] tags = (ITag[]) inputElement;
+ return tags;
+ }
+ });
+ result.setLabelProvider(new LabelProvider() {
+ public Image getImage(Object element) {
+ if (element == null)
+ return null;
+ ITag tag = (ITag) element;
+ if (!(tag instanceof CVSTag))
+ return null;
+
+ switch (((CVSTag)tag).getType()) {
+ case CVSTag.BRANCH:
+ case CVSTag.HEAD:
+ return branchImage;
+ case CVSTag.VERSION:
+ return versionImage;
+ }
+ return null;
+ }
+
+ public String getText(Object element) {
+ return ((ITag) element).getName();
+ }
+ });
+ result.setSorter(new ViewerSorter() {
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (!(e1 instanceof ITag) || !(e2 instanceof ITag))
+ return super.compare(viewer, e1, e2);
+ CVSTag tag1 = (CVSTag) e1;
+ CVSTag tag2 = (CVSTag) e2;
+ int type1 = tag1.getType();
+ int type2 = tag2.getType();
+ if (type1 != type2) {
+ return type2 - type1;
+ }
+ return super.compare(viewer, tag1, tag2);
+ }
+ });
+ return result;
+ }
+
+ public void setFocus() {
+ sashForm.setFocus();
+ }
+
+ protected void contributeActions() {
+ CVSUIPlugin plugin = CVSUIPlugin.getPlugin();
+
+ //Refresh
+ refreshAction = new Action(CVSUIMessages.HistoryView_refreshLabel, plugin.getImageDescriptor(ICVSUIConstants.IMG_REFRESH_ENABLED)) {
+ public void run() {
+ refresh();
+ }
+ };
+ refreshAction.setToolTipText(CVSUIMessages.HistoryView_refresh);
+ refreshAction.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REFRESH_DISABLED));
+ refreshAction.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REFRESH));
+
+ //Local Mode
+ final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
+ localMode = new Action(CVSUIMessages.CVSHistoryPage_LocalModeAction, plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALMODE)) {
+ public void run() {
+ if (isChecked()){
+ store.setValue(ICVSUIConstants.PREF_REVISION_MODE, LOCAL_MODE);
+ updateFilterMode(LOCAL_MODE);
+ } else
+ setChecked(true);
+ }
+ };
+ localMode.setToolTipText(CVSUIMessages.CVSHistoryPage_LocalModeTooltip);
+ localMode.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALMODE_DISABLED));
+ localMode.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALMODE));
+
+ //Remote Mode
+ remoteMode = new Action(CVSUIMessages.CVSHistoryPage_RemoteModeAction, plugin.getImageDescriptor(ICVSUIConstants.IMG_REMOTEMODE)) {
+ public void run() {
+ if (isChecked()){
+ store.setValue(ICVSUIConstants.PREF_REVISION_MODE, REMOTE_MODE);
+ updateFilterMode(REMOTE_MODE);
+ } else
+ setChecked(true);
+ }
+ };
+ remoteMode.setToolTipText(CVSUIMessages.CVSHistoryPage_RemoteModeTooltip);
+ remoteMode.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REMOTEMODE_DISABLED));
+ remoteMode.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_REMOTEMODE));
+
+ //Remote + Local Mode
+ remoteLocalMode = new Action(CVSUIMessages.CVSHistoryPage_CombinedModeAction, plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALREMOTE_MODE)) {
+ public void run() {
+ if (isChecked()){
+ store.setValue(ICVSUIConstants.PREF_REVISION_MODE, REMOTE_LOCAL_MODE);
+ updateFilterMode(REMOTE_LOCAL_MODE);
+ } else
+ setChecked(true);
+ }
+ };
+ remoteLocalMode.setToolTipText(CVSUIMessages.CVSHistoryPage_CombinedModeTooltip);
+ remoteLocalMode.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALREMOTE_MODE_DISABLED));
+ remoteLocalMode.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_LOCALREMOTE_MODE));
+
+ //set the inital filter to both remote and local
+ updateFilterMode(store.getInt(ICVSUIConstants.PREF_REVISION_MODE));
+
+ //Group by Date
+ groupByDateMode = new Action(CVSUIMessages.CVSHistoryPage_GroupByDate, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY)){
+ public void run() {
+ groupingOn = !groupingOn;
+ store.setValue(ICVSUIConstants.PREF_GROUPBYDATE_MODE, groupingOn);
+ refreshHistory(false, false);
+ }
+ };
+ groupingOn = store.getBoolean(ICVSUIConstants.PREF_GROUPBYDATE_MODE);
+ groupByDateMode.setChecked(groupingOn);
+ groupByDateMode.setToolTipText(CVSUIMessages.CVSHistoryPage_GroupByDate);
+ groupByDateMode.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY));
+ groupByDateMode.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY));
+
+ //Collapse All
+ collapseAll = new Action(CVSUIMessages.CVSHistoryPage_CollapseAllAction, plugin.getImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL)) {
+ public void run() {
+ treeViewer.collapseAll();
+ }
+ };
+ collapseAll.setToolTipText(CVSUIMessages.CVSHistoryPage_CollapseAllTooltip);
+ collapseAll.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL));
+ collapseAll.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL));
+
+ //Compare Mode Action
+ compareModeAction = new Action(CVSUIMessages.CVSHistoryPage_CompareModeToggleAction,plugin.getImageDescriptor(ICVSUIConstants.IMG_COMPARE_VIEW)) {
+ public void run() {
+ compareMode = !compareMode;
+ compareModeAction.setChecked(compareMode);
+ }
+ };
+ compareModeAction.setToolTipText(CVSUIMessages.CVSHistoryPage_CompareModeTooltip);
+ compareModeAction.setDisabledImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_COMPARE_VIEW));
+ compareModeAction.setHoverImageDescriptor(plugin.getImageDescriptor(ICVSUIConstants.IMG_COMPARE_VIEW));
+ compareModeAction.setChecked(false);
+
+ // Click Compare action
+ compareAction = new CompareRevisionAction(CVSUIMessages.CVSHistoryPage_CompareRevisionAction);
+ treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ //update the current
+ compareAction.setCurrentFileRevision(getCurrentFileRevision());
+ compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ }
+ });
+ compareAction.setPage(this);
+
+ openAction = new OpenRevisionAction(CVSUIMessages.CVSHistoryPage_OpenAction);
+ treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ openAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ }
+ });
+ openAction.setPage(this);
+
+ OpenStrategy handler = new OpenStrategy(treeViewer.getTree());
+ handler.addOpenListener(new IOpenEventListener() {
+ public void handleOpen(SelectionEvent e) {
+ StructuredSelection tableStructuredSelection = (StructuredSelection) treeViewer.getSelection();
+ if (compareMode){
+ StructuredSelection sel = new StructuredSelection(new Object[] {getCurrentFileRevision(), tableStructuredSelection.getFirstElement()});
+ compareAction.selectionChanged(sel);
+ compareAction.run();
+ } else {
+ //Pass in the entire structured selection to allow for multiple editor openings
+ StructuredSelection sel = tableStructuredSelection;
+ openAction.selectionChanged(sel);
+ openAction.run();
+ }
+ }
+ });
+
+ getContentsAction = getContextMenuAction(CVSUIMessages.HistoryView_getContentsAction, true /* needs progress */, new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask(null, 100);
+ try {
+ if(confirmOverwrite() && validateChange()) {
+ IStorage currentStorage = currentSelection.getStorage(new SubProgressMonitor(monitor, 50));
+ InputStream in = currentStorage.getContents();
+ ((IFile)file.getIResource()).setContents(in, false, true, new SubProgressMonitor(monitor, 50));
+ }
+ } catch (TeamException e) {
+ throw new CoreException(e.getStatus());
+ } finally {
+ monitor.done();
+ }
+ }
+ });
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getContentsAction, IHelpContextIds.GET_FILE_CONTENTS_ACTION);
+
+ getRevisionAction = getContextMenuAction(CVSUIMessages.HistoryView_getRevisionAction, true /* needs progress */, new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ ICVSRemoteFile remoteFile = (ICVSRemoteFile) CVSWorkspaceRoot.getRemoteResourceFor(((CVSFileRevision) currentSelection).getCVSRemoteFile());
+ try {
+ if(confirmOverwrite() && validateChange()) {
+ CVSTag revisionTag = new CVSTag(remoteFile.getRevision(), CVSTag.VERSION);
+
+ if(CVSAction.checkForMixingTags(getSite().getShell(), new IResource[] {file.getIResource()}, revisionTag)) {
+ new UpdateOperation(
+ null,
+ new IResource[] {file.getIResource()},
+ new Command.LocalOption[] {Update.IGNORE_LOCAL_CHANGES},
+ revisionTag)
+ .run(monitor);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ refresh();
+ }
+ });
+ }
+ }
+ } catch (InvocationTargetException e) {
+ CVSException.wrapException(e);
+ } catch (InterruptedException e) {
+ // Cancelled by user
+ }
+ }
+ });
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getRevisionAction, IHelpContextIds.GET_FILE_REVISION_ACTION);
+
+ // Override MoveRemoteTagAction to work for log entries
+ final IActionDelegate tagActionDelegate = new MoveRemoteTagAction() {
+ protected ICVSResource[] getSelectedCVSResources() {
+ ICVSResource[] resources = super.getSelectedCVSResources();
+ if (resources == null || resources.length == 0) {
+ ArrayList logEntrieFiles = null;
+ IStructuredSelection selection = getSelection();
+ if (!selection.isEmpty()) {
+ logEntrieFiles = new ArrayList();
+ Iterator elements = selection.iterator();
+ while (elements.hasNext()) {
+ Object next = elements.next();
+ if (next instanceof CVSFileRevision) {
+ logEntrieFiles.add(((CVSFileRevision)next).getCVSRemoteFile());
+ continue;
+ }
+ if (next instanceof IAdaptable) {
+ IAdaptable a = (IAdaptable) next;
+ Object adapter = a.getAdapter(ICVSResource.class);
+ if (adapter instanceof ICVSResource) {
+ logEntrieFiles.add(((ILogEntry)adapter).getRemoteFile());
+ continue;
+ }
+ }
+ }
+ }
+ if (logEntrieFiles != null && !logEntrieFiles.isEmpty()) {
+ return (ICVSResource[])logEntrieFiles.toArray(new ICVSResource[logEntrieFiles.size()]);
+ }
+ }
+ return resources;
+ }
+ /*
+ * Override the creation of the tag operation in order to support
+ * the refresh of the view after the tag operation completes
+ */
+ protected ITagOperation createTagOperation() {
+ return new TagInRepositoryOperation(getTargetPart(), getSelectedRemoteResources()) {
+ public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
+ super.execute(monitor);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if( ! wasCancelled()) {
+ refresh();
+ }
+ }
+ });
+ };
+ };
+ }
+ };
+ tagWithExistingAction = getContextMenuAction(CVSUIMessages.HistoryView_tagWithExistingAction, false /* no progress */, new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ tagActionDelegate.selectionChanged(tagWithExistingAction, treeViewer.getSelection());
+ tagActionDelegate.run(tagWithExistingAction);
+ }
+ });
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getRevisionAction, IHelpContextIds.TAG_WITH_EXISTING_ACTION);
+
+ // Toggle text visible action
+ toggleTextAction = new Action(TeamUIMessages.GenericHistoryView_ShowCommentViewer) {
+ public void run() {
+ setViewerVisibility();
+ store.setValue(ICVSUIConstants.PREF_SHOW_COMMENTS, toggleTextAction.isChecked());
+ }
+ };
+ toggleTextAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_SHOW_COMMENTS));
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(toggleTextAction, IHelpContextIds.SHOW_COMMENT_IN_HISTORY_ACTION);
+
+ // Toggle wrap comments action
+ toggleTextWrapAction = new Action(TeamUIMessages.GenericHistoryView_WrapComments) {
+ public void run() {
+ setViewerVisibility();
+ store.setValue(ICVSUIConstants.PREF_WRAP_COMMENTS, toggleTextWrapAction.isChecked());
+ }
+ };
+ toggleTextWrapAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_WRAP_COMMENTS));
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(toggleTextWrapAction, IHelpContextIds.SHOW_TAGS_IN_HISTORY_ACTION);
+
+ // Toggle list visible action
+ toggleListAction = new Action(TeamUIMessages.GenericHistoryView_ShowTagViewer) {
+ public void run() {
+ setViewerVisibility();
+ store.setValue(ICVSUIConstants.PREF_SHOW_TAGS, toggleListAction.isChecked());
+ }
+ };
+ toggleListAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_SHOW_TAGS));
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(toggleListAction, IHelpContextIds.SHOW_TAGS_IN_HISTORY_ACTION);
+
+ //Toggle search field
+ toggleSearchAction= new Action(CVSUIMessages.CVSHistoryPage_ShowSearchField) {
+ public void run() {
+ setViewerVisibility();
+ store.setValue(ICVSUIConstants.PREF_SHOW_SEARCH, toggleSearchAction.isChecked());
+ if (!toggleSearchAction.isChecked()){
+ if (searchFilter != null)
+ treeViewer.removeFilter(searchFilter);
+ } else {
+ searchField.setText(CVSUIMessages.CVSHistoryPage_EnterSearchTerm);
+ searchField.selectAll();
+ searchField.setFocus();
+ }
+ }
+ };
+ toggleSearchAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_SHOW_SEARCH));
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(toggleListAction, IHelpContextIds.SHOW_TAGS_IN_HISTORY_ACTION);
+
+ toggleFilterAction = new Action(CVSUIMessages.CVSHistoryPage_NoFilter){
+ public void run(){
+ if (historyFilter != null)
+ treeViewer.removeFilter(historyFilter);
+ historyFilter = null;
+ IHistoryPageSite historyPageSite = getHistoryPageSite();
+ if (historyPageSite instanceof WorkbenchHistoryPageSite){
+ IWorkbenchPart part = ((WorkbenchHistoryPageSite) historyPageSite).getPart();
+ if (part instanceof GenericHistoryView){
+ ((GenericHistoryView) part).updateContentDescription(file.getName());
+ }
+ }
+ toggleFilterAction.setEnabled(false);
+ }
+ };
+ toggleFilterAction.setEnabled(historyFilter != null);
+
+ //Create the filter action
+ cvsHistoryFilter = new CVSHistoryFilterAction(this);
+ cvsHistoryFilter.setText(CVSUIMessages.CVSHistoryPage_FilterOn);
+ cvsHistoryFilter.init(treeViewer);
+ cvsHistoryFilter.setToolTipText(CVSUIMessages.CVSHistoryPage_FilterHistoryTooltip);
+
+ //Contribute actions to popup menu
+ MenuManager menuMgr = new MenuManager();
+ Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuMgr) {
+ fillTableMenu(menuMgr);
+ }
+ });
+ menuMgr.setRemoveAllWhenShown(true);
+ treeViewer.getTree().setMenu(menu);
+ //Don't add the object contribution menu items if this page is hosted in a dialog
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ if (!parentSite.isModal()) {
+ IWorkbenchPart part = parentSite.getPart();
+ if (part != null) {
+ IWorkbenchPartSite workbenchPartSite = part.getSite();
+ workbenchPartSite.registerContextMenu(menuMgr, treeViewer);
+ }
+ IPageSite pageSite = parentSite.getWorkbenchPageSite();
+ if (pageSite != null) {
+ IActionBars actionBars = pageSite.getActionBars();
+ // Contribute toggle text visible to the toolbar drop-down
+ IMenuManager actionBarsMenu = actionBars.getMenuManager();
+ if (actionBarsMenu != null){
+ actionBarsMenu.add(toggleTextWrapAction);
+ actionBarsMenu.add(new Separator());
+ actionBarsMenu.add(toggleTextAction);
+ actionBarsMenu.add(toggleListAction);
+ actionBarsMenu.add(new Separator());
+ actionBarsMenu.add(toggleSearchAction);
+ actionBarsMenu.add(new Separator());
+ actionBarsMenu.add(cvsHistoryFilter);
+ actionBarsMenu.add(toggleFilterAction);
+ }
+ // Create actions for the text editor
+ copyAction = new TextViewerAction(textViewer, ITextOperationTarget.COPY);
+ copyAction.setText(CVSUIMessages.HistoryView_copy);
+ actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, copyAction);
+
+ selectAllAction = new TextViewerAction(textViewer, ITextOperationTarget.SELECT_ALL);
+ selectAllAction.setText(CVSUIMessages.HistoryView_selectAll);
+ actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, selectAllAction);
+
+ actionBars.updateActionBars();
+ }
+ }
+
+
+
+ //Create the local tool bar
+ IToolBarManager tbm = parentSite.getToolBarManager();
+ if (tbm != null) {
+ String fileNameQualifier = getFileNameQualifier();
+ //Add groups
+ tbm.add(new Separator(fileNameQualifier + "grouping")); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"grouping", groupByDateMode); //$NON-NLS-1$
+ tbm.add(new Separator(fileNameQualifier+"modes")); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"modes", remoteLocalMode); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"modes", localMode); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"modes", remoteMode); //$NON-NLS-1$
+ tbm.add(new Separator(fileNameQualifier+"collapse")); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"collapse", collapseAll); //$NON-NLS-1$
+ if (!parentSite.isModal()) {
+ //don't bother adding the compare mode toolbar button if in
+ //a dialog; you can only compare from dialogs
+ tbm.appendToGroup(fileNameQualifier+"collapse", compareModeAction); //$NON-NLS-1$
+ }
+ tbm.update(false);
+ }
+
+ menuMgr = new MenuManager();
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuMgr) {
+ fillTextMenu(menuMgr);
+ }
+ });
+ StyledText text = textViewer.getTextWidget();
+ menu = menuMgr.createContextMenu(text);
+ text.setMenu(menu);
+ }
+
+ private String getFileNameQualifier() {
+ //Just append the current system time to generate a unique group name
+ return Long.toString(System.currentTimeMillis());
+ }
+
+ private boolean isLocalHistoryFilteredOut() {
+ return localFilteredOut;
+ }
+
+ private boolean isRemoteHistoryFilteredOut(){
+ return remoteFilteredOut;
+ }
+
+ /* private */ void fillTableMenu(IMenuManager manager) {
+ // file actions go first (view file)
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ manager.add(new Separator(IWorkbenchActionConstants.GROUP_FILE));
+
+ if (file != null && !parentSite.isModal()){
+ manager.add(openAction);
+ manager.add(compareAction);
+ manager.add(new Separator("openCompare")); //$NON-NLS-1$
+ }
+ if (file != null &&
+ !(file instanceof RemoteFile)) {
+ // Add the "Add to Workspace" action if 1 revision is selected.
+ ISelection sel = treeViewer.getSelection();
+ if (!sel.isEmpty()) {
+ if (sel instanceof IStructuredSelection) {
+ IStructuredSelection tempSelection = (IStructuredSelection) sel;
+ if (tempSelection.size() == 1) {
+ manager.add(getContentsAction);
+ if (!(tempSelection.getFirstElement() instanceof LocalFileRevision)) {
+ manager.add(getRevisionAction);
+ manager.add(new Separator());
+ if (!parentSite.isModal())
+ manager.add(tagWithExistingAction);
+ }
+ }
+ }
+ }
+ }
+
+ if (!parentSite.isModal()){
+ manager.add(new Separator("additions")); //$NON-NLS-1$
+ manager.add(refreshAction);
+ manager.add(new Separator("additions-end")); //$NON-NLS-1$
+ }
+ }
+
+ private void fillTextMenu(IMenuManager manager) {
+ manager.add(copyAction);
+ manager.add(selectAllAction);
+ }
+
+ /**
+ * Creates the group that displays lists of the available repositories and
+ * team streams.
+ *
+ * @param the
+ * parent composite to contain the group
+ * @return the group control
+ */
+ protected TreeViewer createTree(Composite parent) {
+
+ historyTableProvider = new CVSHistoryTableProvider();
+ TreeViewer viewer = historyTableProvider.createTree(parent);
+
+ viewer.setContentProvider(new ITreeContentProvider() {
+ public Object[] getElements(Object inputElement) {
+
+ // The entries of already been fetch so return them
+ if (entries != null)
+ return entries;
+
+ if (!(inputElement instanceof IFileHistory) &&
+ !(inputElement instanceof AbstractHistoryCategory[]))
+ return new Object[0];
+
+ if (inputElement instanceof AbstractHistoryCategory[]){
+ return (AbstractHistoryCategory[]) inputElement;
+ }
+
+ final IFileHistory fileHistory = (IFileHistory) inputElement;
+ entries = fileHistory.getFileRevisions();
+
+ return entries;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ entries = null;
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof AbstractHistoryCategory){
+ return ((AbstractHistoryCategory) parentElement).getRevisions();
+ }
+
+ return null;
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element instanceof AbstractHistoryCategory){
+ IFileRevision[] revs = ((AbstractHistoryCategory) element).getRevisions();
+ if (revs != null)
+ return revs.length > 0;
+ }
+ return false;
+ }
+ });
+
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection == null || !(selection instanceof IStructuredSelection)) {
+ textViewer.setDocument(new Document("")); //$NON-NLS-1$
+ tagViewer.setInput(null);
+ return;
+ }
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ if (ss.size() != 1) {
+ textViewer.setDocument(new Document("")); //$NON-NLS-1$
+ tagViewer.setInput(null);
+ return;
+ }
+ Object o = ss.getFirstElement();
+ if (o instanceof AbstractHistoryCategory){
+ textViewer.setDocument(new Document("")); //$NON-NLS-1$
+ tagViewer.setInput(null);
+ return;
+ }
+ IFileRevision entry = (IFileRevision)o;
+ textViewer.setDocument(new Document(entry.getComment()));
+ tagViewer.setInput(entry.getTags());
+ }
+ });
+
+ return viewer;
+ }
+
+ private Action getContextMenuAction(String title, final boolean needsProgressDialog, final IWorkspaceRunnable action) {
+ return new Action(title) {
+ public void run() {
+ try {
+ if (file == null) return;
+ ISelection selection = treeViewer.getSelection();
+ if (!(selection instanceof IStructuredSelection)) return;
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ Object o = ss.getFirstElement();
+
+ if (o instanceof AbstractHistoryCategory)
+ return;
+
+ currentSelection = (IFileRevision)o;
+ if(needsProgressDialog) {
+ PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ action.run(monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ });
+ } else {
+ try {
+ action.run(null);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ } catch (InvocationTargetException e) {
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ CVSUIPlugin.openError(parentSite.getShell(), null, null, e, CVSUIPlugin.LOG_NONTEAM_EXCEPTIONS);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+
+ public boolean isEnabled() {
+ ISelection selection = treeViewer.getSelection();
+ if (!(selection instanceof IStructuredSelection)) return false;
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ if(ss.size() != 1) return false;
+ return true;
+ }
+ };
+ }
+
+ private boolean confirmOverwrite() {
+ if (file!=null && file.getIResource().exists()) {
+ try {
+ if(file.isModified(null)) {
+ String title = CVSUIMessages.HistoryView_overwriteTitle;
+ String msg = CVSUIMessages.HistoryView_overwriteMsg;
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ final MessageDialog dialog = new MessageDialog(parentSite.getShell(), title, null, msg, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
+ final int[] result = new int[1];
+ parentSite.getShell().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ result[0] = dialog.open();
+ }});
+ if (result[0] != 0) {
+ // cancel
+ return false;
+ }
+ }
+ } catch(CVSException e) {
+ CVSUIPlugin.log(e);
+ }
+ }
+ return true;
+ }
+
+ private boolean validateChange(){
+ if (file!=null && file.getIResource().exists()) {
+ IResourceChangeDescriptionFactory factory = ResourceChangeValidator.getValidator().createDeltaFactory();
+ factory.change((IFile) file.getIResource());
+ return IDE.promptToConfirm(getHistoryPageSite().getShell(), CVSUIMessages.CVSHistoryPage_ValidateChangeTitle, NLS.bind(CVSUIMessages.CVSHistoryPage_ValidateChangeMessage, new String[]{file.getName()}), factory.getDelta(), new String[0], true /* syncExec */);
+ }
+
+ return false;
+ }
+
+ /*
+ * Refresh the view by refetching the log entries for the remote file
+ */
+ public void refresh() {
+ //refetch revisions, not a select only job
+ refreshHistory(true, false);
+ }
+
+ private void refreshHistory(boolean refetch, boolean selectOnly) {
+ if (refreshCVSFileHistoryJob.getState() != Job.NONE){
+ refreshCVSFileHistoryJob.cancel();
+ }
+ refreshCVSFileHistoryJob.setFileHistory(cvsFileHistory);
+ IResource resource = previousFile.getIResource();
+ if (resource != null){
+ IResource workspaceFile = ResourcesPlugin.getWorkspace().getRoot().findMember(resource.getFullPath());
+ refreshCVSFileHistoryJob.setWorkspaceFile((IFile) workspaceFile);
+ }
+ //if we need to refetch it's not a select only job and vice versa
+ refreshCVSFileHistoryJob.setSelectOnly(selectOnly);
+ refreshCVSFileHistoryJob.setRefetchHistory(refetch);
+ refreshCVSFileHistoryJob.setIncludeLocals(!isLocalHistoryFilteredOut());
+ refreshCVSFileHistoryJob.setIncludeRemote(!isRemoteHistoryFilteredOut());
+ refreshCVSFileHistoryJob.setGrouping(groupingOn);
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ Utils.schedule(refreshCVSFileHistoryJob, getWorkbenchSite(parentSite));
+ }
+
+ private IWorkbenchPartSite getWorkbenchSite(IHistoryPageSite parentSite) {
+ IWorkbenchPart part = parentSite.getPart();
+ if (part != null)
+ return part.getSite();
+ return null;
+ }
+
+ /**
+ * Select the revision in the receiver.
+ */
+ public void selectRevision(String revision) {
+ IFileRevision entry = null;
+ if (entries != null) {
+ for (int i = 0; i < entries.length; i++) {
+ if (entries[i].getContentIdentifier().equals(revision)) {
+ entry = entries[i];
+ break;
+ }
+ }
+ } else if (cvsFileHistory != null) {
+ entry = cvsFileHistory.getFileRevision(revision);
+ }
+
+ if (entry != null) {
+ IStructuredSelection selection = new StructuredSelection(entry);
+ treeViewer.getTree().setRedraw(false);
+ treeViewer.setSelection(selection, true);
+ treeViewer.getTree().setRedraw(true);
+ } else {
+ //nothing to select so clear selection
+ treeViewer.getTree().deselectAll();
+ }
+ }
+
+ /**
+ * Select the local revision in the receiver. Local revisions are differentiated by their
+ * timestamps.
+ */
+ public void selectLocalRevision(long timeStamp){
+ IFileRevision entry = null;
+ if (entries != null) {
+ for (int i = 0; i < entries.length; i++) {
+ if (entries[i].getTimestamp() == timeStamp) {
+ entry = entries[i];
+ break;
+ }
+ }
+ }else if (cvsFileHistory != null) {
+ IFileRevision[] tempEntries = cvsFileHistory.getFileRevisions();
+ for (int i = 0; i < tempEntries.length; i++) {
+ if (tempEntries[i].getTimestamp() == timeStamp) {
+ entry = tempEntries[i];
+ break;
+ }
+ }
+ }
+
+ if (entry != null) {
+ IStructuredSelection selection = new StructuredSelection(entry);
+ treeViewer.getTree().setRedraw(false);
+ treeViewer.setSelection(selection, true);
+ treeViewer.getTree().setRedraw(true);
+ } else {
+ //nothing to select so clear selection
+ treeViewer.getTree().deselectAll();
+ }
+ }
+
+ private ICVSFile getCVSFile(Object object) {
+ if (object instanceof IFile)
+ return CVSWorkspaceRoot.getCVSFileFor((IFile) object);
+
+ //Adapt object to ICVSFile
+ Object cvsFileAdapter = Utils.getAdapter(object, ICVSFile.class);
+ if (cvsFileAdapter != null)
+ return (ICVSFile) cvsFileAdapter;
+
+ return null;
+ }
+
+ /* private */void setViewerVisibility() {
+ boolean showText = toggleTextAction.isChecked();
+ boolean showList = toggleListAction.isChecked();
+ boolean showSearch = toggleSearchAction.isChecked();
+
+ //check to see if this page is being shown in a dialog, in which case
+ //don't show the text and list panes
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ if (parentSite.isModal()){
+ showText = false;
+ showList = false;
+ }
+
+
+ if (showText && showList && showSearch) {
+ //tree + 1 + 2 + search
+ sashForm.setWeights(new int[] {60, 25, 15});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(null);
+ searchSashForm.setMaximizedControl(null);
+ } else if (showText && showSearch) {
+ //tree + 1 + search
+ sashForm.setWeights(new int[] {60, 25, 15});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(textViewer.getTextWidget());
+ searchSashForm.setMaximizedControl(searchField);
+ } else if (showList && showSearch) {
+ //tree + 2 + search
+ sashForm.setWeights(new int[] {60, 25, 15});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(tagViewer.getTable());
+ searchSashForm.setMaximizedControl(searchField);
+ } else if (showSearch){
+ //tree + search
+ sashForm.setWeights(new int[] {85, 0, 15});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(null);
+ searchSashForm.setMaximizedControl(searchField);
+ } else if (showText && showList) {
+ //tree + 1 + 2
+ sashForm.setWeights(new int[] {70, 30, 0});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(null);
+ searchSashForm.setMaximizedControl(searchField);
+ } else if (showText) {
+ //tree + 1
+ sashForm.setWeights(new int[] {70, 30, 0});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(textViewer.getTextWidget());
+ } else if (showList) {
+ //tree + 2
+ sashForm.setWeights(new int[] {70, 30, 0});
+ sashForm.setMaximizedControl(null);
+ innerSashForm.setMaximizedControl(tagViewer.getTable());
+ } else {
+ //tree
+ sashForm.setMaximizedControl(treeViewer.getControl());
+ }
+
+ boolean wrapText = toggleTextWrapAction.isChecked();
+ textViewer.getTextWidget().setWordWrap(wrapText);
+ }
+
+ private void initializeImages() {
+ CVSUIPlugin plugin = CVSUIPlugin.getPlugin();
+ versionImage = plugin.getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION).createImage();
+ branchImage = plugin.getImageDescriptor(ICVSUIConstants.IMG_TAG).createImage();
+ }
+
+ public void dispose() {
+ shutdown = true;
+
+ if (resourceListener != null){
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener);
+ resourceListener = null;
+ }
+
+ if (branchImage != null) {
+ branchImage.dispose();
+ branchImage = null;
+ }
+ if (versionImage != null) {
+ versionImage.dispose();
+ versionImage = null;
+ }
+
+ //Cancel any incoming
+ if (refreshCVSFileHistoryJob != null) {
+ if (refreshCVSFileHistoryJob.getState() != Job.NONE) {
+ refreshCVSFileHistoryJob.cancel();
+ }
+ }
+ }
+
+ public IFileRevision getCurrentFileRevision() {
+ if (currentFileRevision != null)
+ return currentFileRevision;
+
+ if (file != null) {
+ try {
+ //Case 1 : file is remote
+ if (file instanceof RemoteFile) {
+ RemoteFile remote = (RemoteFile) file;
+ currentFileRevision = cvsFileHistory.getFileRevision(remote.getContentIdentifier());
+ //remote.getContents(monitor);
+ //currentFileRevision = new CVSFileRevision(remote.getLogEntry(monitor));
+ return currentFileRevision;
+ }
+ //Case 2 : file is local
+ //if (file.isModified(monitor)) {
+ //file has been modified locally
+ IFile localFile = (IFile) file.getIResource();
+ if (localFile != null) {
+ //make sure that there's actually a resource associated with the file
+ currentFileRevision = new LocalFileRevision(localFile);
+ } else {
+ //no local version exists
+ if (file.getSyncInfo() != null) {
+ currentFileRevision = cvsFileHistory.getFileRevision(file.getSyncInfo().getRevision());
+ }
+ }
+ return currentFileRevision;
+ } catch (CVSException e) {
+ }
+ }
+
+ return null;
+ }
+
+ private final class SearchHistoryTable implements Runnable {
+ public void run() {
+ String searchString = searchField.getText();
+ if (searchString.equals("") || //$NON-NLS-1$
+ searchString.equals(CVSUIMessages.CVSHistoryPage_EnterSearchTerm)) {
+ if (searchFilter != null)
+ treeViewer.removeFilter(searchFilter);
+ return;
+ }
+
+
+ if (searchFilter != null)
+ treeViewer.removeFilter(searchFilter);
+
+ searchFilter = new CVSHistorySearchFilter(searchString);
+
+ if (historyFilter != null)
+ treeViewer.removeFilter(historyFilter);
+
+ treeViewer.addFilter(searchFilter);
+ }
+ }
+
+
+ private class RefreshCVSFileHistory extends Job {
+ private final static int NUMBER_OF_CATEGORIES = 4;
+
+ private CVSFileHistory fileHistory;
+ private AbstractHistoryCategory[] categories;
+ private boolean grouping;
+ private Object[] elementsToExpand;
+ private boolean revisionsFound;
+ private IFile workspaceFile;
+ private CVSHistoryPage page;
+ private boolean selectOnly;
+ private boolean useLocalSelect;
+
+ private CVSLocalFileRevision localFileRevision;
+
+ public RefreshCVSFileHistory(CVSHistoryPage page) {
+ super(CVSUIMessages.HistoryView_fetchHistoryJob);
+ this.page = page;
+ }
+
+ public void setWorkspaceFile(IFile workspaceFile) {
+ this.workspaceFile = workspaceFile;
+ }
+
+ public void setIncludeLocals(boolean flag) {
+ if (fileHistory != null)
+ fileHistory.includeLocalRevisions(flag);
+ }
+
+ public void setIncludeRemote(boolean flag){
+ if (fileHistory != null)
+ fileHistory.includeRemoteRevisions(flag);
+ }
+
+ public void setRefetchHistory(boolean refetch) {
+ if (fileHistory != null)
+ fileHistory.setRefetchRevisions(refetch);
+ }
+
+ public void setFileHistory(CVSFileHistory fileHistory) {
+ this.fileHistory = fileHistory;
+ }
+
+ public void setGrouping (boolean value){
+ this.grouping = value;
+ }
+
+ public void setSelectOnly(boolean select) {
+ this.selectOnly = select;
+ }
+
+ public void setSelectLocal(boolean localSelect) {
+ this.useLocalSelect = localSelect;
+ }
+
+ public void setLocalFileRevision(CVSLocalFileRevision localRev){
+ this.localFileRevision = localRev;
+ }
+
+ public IStatus run(IProgressMonitor monitor) {
+
+ IStatus status = Status.OK_STATUS;
+
+ if (fileHistory != null && !shutdown) {
+ //If fileHistory termintates in a bad way, try to fetch the local
+ //revisions only
+ try {
+ fileHistory.refresh(monitor);
+ } catch (TeamException ex) {
+ fileHistory.fetchLocalOnly(monitor);
+ status = new CVSStatus(ex.getStatus().getSeverity(), ex.getStatus().getCode(), ex.getMessage(), ex);
+ }
+
+ if (grouping)
+ revisionsFound = sortRevisions();
+
+ Utils.asyncExec(new Runnable() {
+ public void run() {
+ historyTableProvider.setLocalRevisionsDisplayed(fileHistory.getIncludesExists());
+ historyTableProvider.setFile(fileHistory, workspaceFile);
+ //historyTableProvider.setWorkspaceFile(workspaceFile);
+ if (!selectOnly){
+ if (grouping) {
+ mapExpandedElements(treeViewer.getExpandedElements());
+ treeViewer.getTree().setLinesVisible(revisionsFound);
+ treeViewer.getTree().setRedraw(false);
+ treeViewer.setInput(categories);
+ //if user is switching modes and already has expanded elements
+ //selected try to expand those, else expand all
+ if (elementsToExpand.length > 0)
+ treeViewer.setExpandedElements(elementsToExpand);
+ else {
+ treeViewer.expandAll();
+ Object[] el = treeViewer.getExpandedElements();
+ if (el != null && el.length > 0) {
+ treeViewer.setSelection(new StructuredSelection(el[0]));
+ treeViewer.getTree().deselectAll();
+ }
+ }
+ treeViewer.getTree().setRedraw(true);
+ } else {
+ if (fileHistory.getFileRevisions().length > 0) {
+ treeViewer.getTree().setLinesVisible(true);
+ treeViewer.setInput(fileHistory);
+ } else {
+ categories = new AbstractHistoryCategory[] {getErrorMessage()};
+ treeViewer.getTree().setLinesVisible(false);
+ treeViewer.setInput(categories);
+ }
+ }
+ }
+ //Update the history (if it exists) to reflect the new
+ //counts
+ if (historyFilter != null){
+ CVSHistoryFilter tempFilter = new CVSHistoryFilter(historyFilter.author, historyFilter.comment, historyFilter.fromDate, historyFilter.toDate, historyFilter.isOr);
+ showFilter(tempFilter);
+ }
+
+ //Select the current file if we didn't have to refetch the history
+ if (file != null){
+ try {
+ if (useLocalSelect){
+ page.selectLocalRevision(localFileRevision.getTimestamp());
+ } else {
+ byte[] syncBytes = file.getSyncBytes();
+ if (syncBytes != null) {
+ String workspaceRevision = ResourceSyncInfo.getRevision(syncBytes);
+ page.selectRevision(workspaceRevision);
+ }
+ }
+ } catch (CVSException e){
+ }
+ }
+ }
+ }, treeViewer);
+ }
+
+ if (status != Status.OK_STATUS ) {
+ this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+ this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
+ }
+
+ return status;
+ }
+
+ private void mapExpandedElements(Object[] expandedElements) {
+ //store the names of the currently expanded categories in a map
+ HashMap elementMap = new HashMap();
+ for (int i=0; i<expandedElements.length; i++){
+ elementMap.put(((DateHistoryCategory)expandedElements[i]).getName(), null);
+ }
+
+ //Go through the new categories and keep track of the previously expanded ones
+ ArrayList expandable = new ArrayList();
+ for (int i = 0; i<categories.length; i++){
+ //check to see if this category is currently expanded
+ if (elementMap.containsKey(categories[i].getName())){
+ expandable.add(categories[i]);
+ }
+ }
+
+ elementsToExpand = new Object[expandable.size()];
+ elementsToExpand = (Object[]) expandable.toArray(new Object[expandable.size()]);
+ }
+
+ private boolean sortRevisions() {
+ IFileRevision[] fileRevision = fileHistory.getFileRevisions();
+
+ //Create the 4 categories
+ DateHistoryCategory[] tempCategories = new DateHistoryCategory[NUMBER_OF_CATEGORIES];
+ //Get a calendar instance initialized to the current time
+ Calendar currentCal = Calendar.getInstance();
+ tempCategories[0] = new DateHistoryCategory(CVSUIMessages.CVSHistoryPage_Today, currentCal, null);
+ //Get yesterday
+ Calendar yesterdayCal = Calendar.getInstance();
+ yesterdayCal.roll(Calendar.DAY_OF_YEAR, -1);
+ tempCategories[1] = new DateHistoryCategory(CVSUIMessages.CVSHistoryPage_Yesterday, yesterdayCal, null);
+ //Get this month
+ Calendar monthCal = Calendar.getInstance();
+ monthCal.set(Calendar.DAY_OF_MONTH, 1);
+ tempCategories[2] = new DateHistoryCategory(CVSUIMessages.CVSHistoryPage_ThisMonth, monthCal, yesterdayCal);
+ //Everything before this month is previous
+ tempCategories[3] = new DateHistoryCategory(CVSUIMessages.CVSHistoryPage_Previous, null, monthCal);
+
+ ArrayList finalCategories = new ArrayList();
+ for (int i = 0; i<NUMBER_OF_CATEGORIES; i++){
+ tempCategories[i].collectFileRevisions(fileRevision, false);
+ if (tempCategories[i].hasRevisions())
+ finalCategories.add(tempCategories[i]);
+ }
+
+ //Assume that some revisions have been found
+ boolean revisionsFound = true;
+
+ if (finalCategories.size() == 0){
+ //no revisions found for the current mode, so add a message category
+ finalCategories.add(getErrorMessage());
+ revisionsFound = false;
+ }
+
+ categories = (AbstractHistoryCategory[])finalCategories.toArray(new AbstractHistoryCategory[finalCategories.size()]);
+ return revisionsFound;
+ }
+
+ private MessageHistoryCategory getErrorMessage(){
+ String message = ""; //$NON-NLS-1$
+ switch(currentFilerMode){
+ case LOCAL_MODE:
+ message = CVSUIMessages.CVSHistoryPage_LocalModeTooltip;
+ break;
+
+ case REMOTE_MODE:
+ message = CVSUIMessages.CVSHistoryPage_RemoteModeTooltip;
+ break;
+
+ case REMOTE_LOCAL_MODE:
+ message = CVSUIMessages.CVSHistoryPage_NoRevisions;
+ break;
+ }
+
+ MessageHistoryCategory messageCategory = new MessageHistoryCategory(NLS.bind(CVSUIMessages.CVSHistoryPage_NoRevisionsForMode, new String[] { message }));
+ return messageCategory;
+ }
+
+
+
+ }
+
+
+ /**
+ * A default content provider to prevent subclasses from
+ * having to implement methods they don't need.
+ */
+ private class SimpleContentProvider implements IStructuredContentProvider {
+
+ /**
+ * SimpleContentProvider constructor.
+ */
+ public SimpleContentProvider() {
+ super();
+ }
+
+ /*
+ * @see SimpleContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * @see SimpleContentProvider#getElements()
+ */
+ public Object[] getElements(Object element) {
+ return new Object[0];
+ }
+
+ /*
+ * @see SimpleContentProvider#inputChanged()
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ }
+
+ private class HistoryResourceListener implements IResourceChangeListener {
+ /**
+ * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta root = event.getDelta();
+ //Safety check for non-managed files that are added with the CVSHistoryPage
+ //in view
+ if (file == null || file.getIResource() == null)
+ return;
+
+ IResourceDelta resourceDelta = root.findMember(((IFile)file.getIResource()).getFullPath());
+ if (resourceDelta != null){
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ refresh();
+ }
+ });
+ }
+ }
+ }
+
+ public Control getControl() {
+ return sashForm;
+ }
+
+ public boolean isValidInput(Object object) {
+ if (object instanceof IResource){
+ RepositoryProvider provider = RepositoryProvider.getProvider(((IResource)object).getProject());
+ if (provider instanceof CVSTeamProvider)
+ return true;
+ } else if (object instanceof ICVSRemoteResource){
+ return true;
+ } else if (object instanceof CVSFileRevision) {
+ return true;
+ } else if (object instanceof CVSLocalFileRevision) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public String getName() {
+ if (file != null)
+ return file.getName();
+
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the path of the file currently being shown in the CVS History Page.
+ * @return an IPath or <code>null</code> if the file is null
+ */
+ public IPath getFilePath() {
+ if (file != null)
+ return file.getIResource().getFullPath();
+
+ return null;
+ }
+
+ /*
+ * Used to reset sorting in CVSHistoryTableProvider for
+ * changes to local revisions displays. Local revisions don't
+ * have a revision id so we need to sort by date when they are
+ * displayed - else we can just sort by revision id.
+ */
+ public void setSorter(boolean localDisplayed) {
+ historyTableProvider.setLocalRevisionsDisplayed(localDisplayed);
+ }
+
+ public Object getAdapter(Class adapter) {
+ if(adapter == IHistoryCompareAdapter.class) {
+ return this;
+ }
+ return null;
+ }
+
+ public ICompareInput getCompareInput(Object object) {
+
+ if (object != null && object instanceof IStructuredSelection) {
+ IStructuredSelection ss= (IStructuredSelection) object;
+ if (ss.size() == 1) {
+ Object o = ss.getFirstElement();
+ if (o instanceof IFileRevision){
+ IFileRevision selectedFileRevision = (IFileRevision)o;
+ TypedBufferedContent left = new TypedBufferedContent((IFile) file.getIResource());
+ FileRevisionTypedElement right = new FileRevisionTypedElement(selectedFileRevision);
+ DiffNode node = new DiffNode(left,right);
+ return node;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setClickAction(boolean compare) {
+ //toggleCompareAction is going to switch the mode
+ //so make sure that we're in the appropriate mode before
+ compareMode = !compare;
+ compareModeAction.run();
+ }
+
+ public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) {
+ initLabels(input, configuration);
+ // TODO: pre-fetch contents
+ }
+
+ private void initLabels(ICompareInput input, CompareConfiguration cc) {
+ cc.setLeftEditable(false);
+ cc.setRightEditable(false);
+ String leftLabel = getFileRevisionLabel(input.getLeft(), cc);
+ cc.setLeftLabel(leftLabel);
+ String rightLabel = getFileRevisionLabel(input.getRight(), cc);
+ cc.setRightLabel(rightLabel);
+ }
+
+ private String getFileRevisionLabel(ITypedElement element, CompareConfiguration cc) {
+ String label = null;
+
+ if (element instanceof TypedBufferedContent) {
+ //current revision
+ Date dateFromLong = new Date(((TypedBufferedContent) element).getModificationDate());
+ label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ element.getName(), DateFormat.getDateTimeInstance().format(dateFromLong)});
+ cc.setLeftEditable(true);
+ return label;
+
+ } else if (element instanceof FileRevisionTypedElement) {
+ Object fileObject = ((FileRevisionTypedElement) element).getFileRevision();
+
+ if (fileObject instanceof LocalFileRevision) {
+ try {
+ IStorage storage = ((LocalFileRevision) fileObject).getStorage(new NullProgressMonitor());
+ if (Utils.getAdapter(storage, IFileState.class) != null) {
+ //local revision
+ label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_localRevision, new Object[]{element.getName(), ((FileRevisionTypedElement) element).getTimestamp()});
+ }
+ } catch (CoreException e) {
+ }
+ } else {
+ label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_repository, new Object[]{ element.getName(), ((FileRevisionTypedElement) element).getContentIdentifier()});
+ }
+ }
+ return label;
+ }
+
+ public String getDescription() {
+ try {
+ if (file != null)
+ return file.getRepositoryRelativePath();
+ } catch (CVSException e) {
+ // Ignore
+ }
+ return null;
+ }
+
+ public boolean inputSet() {
+ //reset currentFileRevision
+ currentFileRevision = null;
+ Object inputObj = getInput();
+
+ ICVSFile cvsFile = getCVSFile(inputObj);
+ if (cvsFile == null)
+ return false;
+
+
+ this.file = cvsFile;
+
+ if (refreshCVSFileHistoryJob == null)
+ refreshCVSFileHistoryJob = new RefreshCVSFileHistory(this);
+
+ //if this input is the same as the last, don't refetch the history
+ //just update the selection
+ boolean needRefresh = checkPreviousInput();
+
+ //if the input is a local file revision, pass it to the refresh job to
+ //allow the refresh job to use it to match the time stamp of the local
+ //files displayed in the history page
+ if (inputObj instanceof CVSLocalFileRevision){
+ refreshCVSFileHistoryJob.setLocalFileRevision((CVSLocalFileRevision) inputObj);
+ } else if (inputObj instanceof IFile) {
+ refreshCVSFileHistoryJob.setLocalFileRevision(new CVSLocalFileRevision((IFile) inputObj));
+ }
+ //let the refresh job know which flavour of select to use (ie. select CVSFileRevisions
+ //or CVSLocalFileRevision)
+ refreshCVSFileHistoryJob.setSelectLocal(inputObj instanceof CVSLocalFileRevision || inputObj instanceof IFile);
+
+
+ //If the file history doesn't need to be refreshed, we can just
+ //use the previous input file history
+ if (needRefresh){
+ cvsFileHistory = new CVSFileHistory(cvsFile);
+ //fetch both local and remote revisions the first time around
+ cvsFileHistory.includeLocalRevisions(true);
+ //blank current input only after we're sure that we have a file
+ //to fetch history for
+ this.treeViewer.setInput(null);
+ }
+
+ //always refresh the history if the input gets set - in which
+ //case set the selectOnly to false
+ refreshHistory(needRefresh, !needRefresh);
+
+ if (toggleSearchAction!= null && toggleSearchAction.isChecked()){
+ searchField.selectAll();
+ searchField.setFocus();
+ }
+
+ return true;
+ }
+
+ /*
+ * Check to see if we need to refresh the input; if the previous file
+ * that was being shown
+ */
+ private boolean checkPreviousInput() {
+
+ if (previousFile != null){
+ try {
+ if (isSameRemote(file, previousFile)
+ && (isSameLocalFile(file, previousFile)
+ || (!isLocal(file) && isLocal(previousFile)))) {
+ return false;
+ }
+ } catch (CVSException e) {
+ }
+ }
+
+ //set previous file to current file
+ previousFile = file;
+ return true;
+ }
+
+ private boolean isLocal(ICVSFile file) {
+ return file.getIResource() != null;
+ }
+
+ private boolean isSameLocalFile(ICVSFile file, ICVSFile previousFile) {
+ IResource r1 = file.getIResource();
+ IResource r2 = previousFile.getIResource();
+ return r1 != null && r2 != null && r1.equals(r2);
+ }
+
+ private boolean isSameRemote(ICVSFile file, ICVSFile previousFile) throws CVSException {
+ String path = file.getRepositoryRelativePath();
+ String previousPath = previousFile.getRepositoryRelativePath();
+
+ //Could be comparing two local files with no remotes
+ if (path == null && previousPath == null)
+ return true;
+
+ return (path != null && previousPath != null && path.equals(previousPath));
+ }
+
+ private void updateFilterMode(int mode) {
+ currentFilerMode=mode;
+ switch(mode){
+ case LOCAL_MODE:
+ localFilteredOut = false;
+ remoteFilteredOut = true;
+ localMode.setChecked(true);
+ remoteMode.setChecked(false);
+ remoteLocalMode.setChecked(false);
+ break;
+
+ case REMOTE_MODE:
+ localFilteredOut = true;
+ remoteFilteredOut = false;
+ localMode.setChecked(false);
+ remoteMode.setChecked(true);
+ remoteLocalMode.setChecked(false);
+ break;
+
+ case REMOTE_LOCAL_MODE:
+ localFilteredOut = false;
+ remoteFilteredOut = false;
+ localMode.setChecked(false);
+ remoteMode.setChecked(false);
+ remoteLocalMode.setChecked(true);
+ break;
+ }
+
+ //the refresh job gets created once the input is set
+ //don't bother trying to refresh any history until the input has been set
+ if (refreshCVSFileHistoryJob != null){
+ //don't refetch, but not a select only job (ie. have to get the
+ //existing revisions corresponding to the mode change)
+ refreshHistory(false, false);
+ }
+ }
+
+ public TreeViewer getTreeViewer() {
+ return treeViewer;
+ }
+
+ public void showFilter(CVSHistoryFilter filter) {
+ if (historyFilter != null)
+ treeViewer.removeFilter(historyFilter);
+
+ historyFilter = filter;
+ int before = cvsFileHistory.getFileRevisions().length;
+ treeViewer.addFilter(historyFilter);
+ IHistoryPageSite historyPageSite =getHistoryPageSite();
+ if (historyPageSite instanceof WorkbenchHistoryPageSite){
+ IWorkbenchPart part = ((WorkbenchHistoryPageSite) historyPageSite).getPart();
+ if (part instanceof GenericHistoryView){
+ String revisions = NLS.bind(CVSUIMessages.CVSHistoryPage_FilterOnMessage, new Object[]{new Integer(historyFilter.getMatchCount()),new Integer(before)});
+ ((GenericHistoryView) part).updateContentDescription(NLS.bind(CVSUIMessages.CVSHistoryPage_FilterDescription, new Object[]{file.getName(), revisions}));
+ }
+ }
+ toggleFilterAction.setEnabled(true);
+ }
+
+ /*
+ * Sets the filter mode for the page.
+ * param flag LOCAL_MODE, REMOTE_MODE, REMOTE_LOCAL_MODE
+ */
+ public void setMode(int flag){
+ switch(flag){
+ case LOCAL_MODE:
+ localMode.setChecked(true);
+ localMode.run();
+ break;
+
+ case REMOTE_MODE:
+ remoteMode.setChecked(true);
+ remoteMode.run();
+ break;
+
+ case REMOTE_LOCAL_MODE:
+ remoteLocalMode.setChecked(true);
+ remoteLocalMode.run();
+ break;
+ }
+
+ //refetch revisions, not a select only job
+ refreshHistory(true, false);
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
new file mode 100644
index 000000000..661fed6ef
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui;
+
+import java.util.*;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.team.core.history.ITag;
+import org.eclipse.team.internal.ccvs.core.filehistory.CVSFileRevision;
+import org.eclipse.team.internal.ui.history.AbstractHistoryCategory;
+
+public class CVSHistorySearchFilter extends org.eclipse.jface.viewers.ViewerFilter {
+
+ public String searchString;
+ private int matchCounter;
+ public ArrayList searchStrings;
+
+ public CVSHistorySearchFilter(String searchStrings) {
+ this.searchString = searchStrings;
+ }
+
+ /**
+ * @see ViewerFilter#select(Viewer, Object, Object)
+ */
+ public boolean select(Viewer aviewer, Object parentElement, Object element) {
+ if (element instanceof AbstractHistoryCategory)
+ return true;
+
+ if (element instanceof CVSFileRevision) {
+ StringTokenizer tokenizer = new StringTokenizer(searchString);
+ searchStrings = new ArrayList();
+ while (tokenizer.hasMoreElements()) {
+ searchStrings.add(tokenizer.nextToken());
+ }
+
+ CVSFileRevision entry = (CVSFileRevision) element;
+ //empty fields should be considered a non-match
+ boolean orSearch = (authorMatch(entry)) || (dateMatch(entry)) || (commentMatch(entry) || revisionMatch(entry) || tagMatch(entry));
+ if (orSearch)
+ matchCounter++;
+ return orSearch;
+ }
+ return false;
+ }
+
+ protected boolean authorMatch(CVSFileRevision revision) {
+ String author = revision.getAuthor();
+ if (author != null){
+ Iterator iter = searchStrings.iterator();
+ while (iter.hasNext()) {
+ String nextString = (String) iter.next();
+ if (!((author.indexOf(nextString)) == -1))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected boolean commentMatch(CVSFileRevision revision) {
+ String comment = revision.getComment().toLowerCase();
+ if (comment != null) {
+ Iterator iter = searchStrings.iterator();
+ while (iter.hasNext()) {
+ if (!(comment.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected boolean dateMatch(CVSFileRevision revision) {
+ //No dates for now
+ /*String date = DateFormat.getInstance().format(new Date(revision.getTimestamp()));
+ Iterator iter = searchStrings.iterator();
+ while (iter.hasNext()){
+ if (!(date.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ return true;
+ }*/
+
+ return false;
+ }
+
+ protected boolean tagMatch(CVSFileRevision revision) {
+ ITag[] tags = revision.getTags();
+ for (int i = 0; i < tags.length; i++) {
+ String tag = tags[i].getName().toLowerCase();
+ Iterator iter = searchStrings.iterator();
+ while (iter.hasNext()) {
+ if (!(tag.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected boolean revisionMatch(CVSFileRevision revision) {
+ String rev = revision.getContentIdentifier();
+ if (rev != null) {
+ Iterator iter = searchStrings.iterator();
+ while (iter.hasNext()) {
+ if (!(rev.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ public int getMatchCount() {
+ return matchCounter;
+ }
+
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
new file mode 100644
index 000000000..2ccf18c8b
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
@@ -0,0 +1,1125 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Maik Schreiber - bug 102461
+ * Philippe Ombredanne - bug 84808
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class CVSUIMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.ui.messages";//$NON-NLS-1$
+ //
+ // Copyright (c) 2000, 2005 IBM Corporation and others.
+ // All rights reserved. This program and the accompanying materials
+ // are made available under the terms of the Eclipse Public License v1.0
+ // which accompanies this distribution, and is available at
+ // http://www.eclipse.org/legal/epl-v10.html
+ //
+ // Contributors:
+ // IBM Corporation - initial API and implementation
+ //
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, CVSUIMessages.class);
+ }
+
+ public static String AnnotatePreferencePage_AnnotatePrefPageBinaryFileMessage;
+ public static String AnnotatePreferencePage_AnnotatePrefPageMessage;
+ public static String AnnotatePreferencePage_AnnotatePrefPageTitle;
+ public static String CheckoutAsMainPage_Browse;
+ public static String CheckoutAsMainPage_EmptyWorkingSetErrorMessage;
+ public static String CheckoutAsMainPage_WorkingSetExistsErrorMessage;
+ public static String CheckoutAsMainPage_WorkingSetMultiple;
+ public static String CheckoutAsMainPage_WorkingSetSingle;
+ public static String CommitAction_0;
+ public static String CommitAction_1;
+ public static String CommitAction_2;
+ public static String CreatePatchAction_0;
+ public static String CreatePatchAction_1;
+ public static String CVSHistoryPage_CollapseAllAction;
+ public static String CVSHistoryPage_CollapseAllTooltip;
+ public static String CVSHistoryPage_CompareModeTooltip;
+ public static String CVSHistoryPage_EnterSearchTerm;
+ public static String CVSHistoryPage_FilterOn;
+ public static String CVSHistoryPage_FilterOnMessage;
+ public static String CVSHistoryPage_FilterDescription;
+ public static String CVSHistoryPage_ShowSearchField;
+ public static String CVSHistoryPage_ValidateChangeMessage;
+ public static String CVSHistoryPage_ValidateChangeTitle;
+ public static String CVSPreferencesPage_46;
+ public static String CVSPreferencesPage_QuickDiffAnnotate;
+ public static String PasswordManagementPreferencePage_2;
+ public static String PasswordManagementPreferencePage_3;
+ public static String PasswordManagementPreferencePage_4;
+ public static String PasswordManagementPreferencePage_5;
+ public static String PasswordManagementPreferencePage_6;
+ public static String ShowAnnotationOperation_QDAnnotateMessage;
+ public static String ShowAnnotationOperation_QDAnnotateTitle;
+ public static String SyncAction_1;
+ public static String UserValidationDialog_5;
+ public static String UserValidationDialog_6;
+ public static String UserValidationDialog_7;
+ public static String simpleInternal;
+ public static String internal;
+ public static String WorkspaceModelParticipant_0;
+ public static String WorkspaceSubscriberContext_1;
+ public static String WorkspaceSubscriberContext_2;
+ public static String WorkspaceSubscriberContext_3;
+ public static String WorkspaceSubscriberContext_4;
+ public static String yes;
+ public static String no;
+ public static String information;
+ public static String cvs;
+ public static String notAvailable;
+ public static String buildError;
+ public static String ok;
+ public static String separator;
+
+ public static String nameAndRevision;
+ public static String currentRevision;
+
+ public static String AddAction_addFailed;
+ public static String AddAction_adding;
+ public static String AddAction_addIgnoredTitle;
+ public static String AddAction_addIgnoredQuestion;
+
+ public static String AddToVersionControlDialog_title;
+ public static String AddToVersionControlDialog_thereIsAnUnaddedResource;
+ public static String AddToVersionControlDialog_thereAreUnaddedResources;
+
+ public static String AvoidableMessageDialog_dontShowAgain;
+
+ public static String BranchWizard_title;
+ public static String BranchWizardPage_pageDescription;
+ public static String BranchWizardPage_pageDescriptionVersion;
+ public static String BranchWizardPage_specifyVersion;
+ public static String BranchWizardPage_branchName;
+ public static String BranchWizardPage_versionName;
+ public static String BranchWizardPage_startWorking;
+ public static String BranchWizardPage_versionPrefix;
+ public static String BranchWizard_versionNameWarning;
+ public static String BranchWizard_branchNameWarning;
+ public static String BranchWizard_branchAndVersionMustBeDifferent;
+ public static String BranchWizardPage_existingVersionsAndBranches;
+
+ public static String ConsolePreferencePage_consoleColorSettings;
+ public static String ConsolePreferencePage_commandColor;
+ public static String ConsolePreferencePage_messageColor;
+ public static String ConsolePreferencePage_errorColor;
+ public static String CVSAction_errorTitle;
+ public static String CVSAction_warningTitle;
+ public static String CVSAction_multipleProblemsMessage;
+ public static String CVSAction_mixingTagsTitle;
+ public static String CVSAction_mixingTags;
+ public static String CVSAction_handlerNotEnabledTitle;
+ public static String CVSAction_handlerNotEnabledMessage;
+
+ public static String CVSAnnotateView_showFileAnnotation;
+ public static String CVSAnnotateView_viewInstructions;
+
+ public static String ShowAnnotationAction_noSyncInfo;
+ public static String ShowAnnotationOperation_taskName;
+ public static String ShowAnnotationOperation_0;
+ public static String ShowAnnotationOperation_1;
+ public static String ShowAnnotationOperation_2;
+ public static String ShowAnnotationOperation_3;
+ public static String ShowAnnotationOperation_4;
+
+ public static String CVSCompareEditorInput_branchLabel;
+ public static String CVSCompareEditorInput_headLabel;
+ public static String CVSCompareEditorInput_comparing;
+ public static String CVSCompareEditorInput_different;
+ public static String CVSCompareEditorInput_inBranch;
+ public static String CVSCompareEditorInput_inHead;
+ public static String CVSCompareEditorInput_0;
+ public static String CVSCompareEditorInput_1;
+ public static String CVSCompareEditorInput_repository;
+ public static String CVSCompareEditorInput_titleAncestor;
+ public static String CVSCompareEditorInput_titleNoAncestor;
+ public static String CVSCompareEditorInput_titleNoAncestorDifferent;
+ public static String CVSCompareRevisionsInput_compareResourceAndVersions;
+ public static String CVSCompareRevisionsInput_repository;
+ public static String CVSCompareRevisionsInput_workspace;
+ public static String CVSCompareRevisionsInput_truncate;
+
+ public static String CVSDecoratorPreferencesPage_0;
+ public static String CVSDecoratorPreferencesPage_1;
+ public static String CVSDecoratorPreferencesPage_2;
+ public static String CVSDecoratorPreferencesPage_3;
+ public static String CVSDecoratorPreferencesPage_4;
+ public static String CVSDecoratorPreferencesPage_5;
+ public static String CVSDecoratorPreferencesPage_6;
+ public static String CVSDecoratorPreferencesPage_7;
+ public static String CVSDecoratorPreferencesPage_8;
+ public static String CVSDecoratorPreferencesPage_9;
+ public static String CVSDecoratorPreferencesPage_10;
+ public static String CVSDecoratorPreferencesPage_11;
+ public static String CVSDecoratorPreferencesPage_12;
+ public static String CVSDecoratorPreferencesPage_13;
+ public static String CVSDecoratorPreferencesPage_14;
+ public static String CVSDecoratorPreferencesPage_15;
+ public static String CVSDecoratorPreferencesPage_16;
+ public static String CVSDecoratorPreferencesPage_17;
+ public static String CVSDecoratorPreferencesPage_18;
+ public static String CVSDecoratorPreferencesPage_19;
+ public static String CVSDecoratorPreferencesPage_20;
+ public static String CVSDecoratorPreferencesPage_21;
+ public static String CVSDecoratorPreferencesPage_22;
+ public static String CVSDecoratorPreferencesPage_23;
+ public static String CVSDecoratorPreferencesPage_24;
+ public static String CVSDecoratorPreferencesPage_25;
+ public static String CVSDecoratorPreferencesPage_26;
+ public static String CVSDecoratorPreferencesPage_27;
+ public static String CVSDecoratorPreferencesPage_28;
+ public static String CVSDecoratorPreferencesPage_29;
+ public static String CVSDecoratorPreferencesPage_30;
+ public static String CVSDecoratorPreferencesPage_31;
+ public static String CVSDecoratorPreferencesPage_32;
+ public static String CVSDecoratorPreferencesPage_33;
+ public static String CVSDecoratorPreferencesPage_34;
+ public static String CVSDecoratorPreferencesPage_35;
+ public static String CVSDecoratorPreferencesPage_36;
+ public static String CVSDecoratorPreferencesPage_37;
+ public static String CVSDecoratorPreferencesPage_38; // repository label
+ public static String CVSDecoratorPreferencesPage_39;
+ public static String CVSDecoratorConfiguration_0;
+ public static String CVSDecoratorConfiguration_1;
+ public static String CVSDecoratorConfiguration_2;
+ public static String CVSDecoratorConfiguration_3;
+ public static String CVSDecoratorConfiguration_4;
+
+ public static String CVSFilePropertiesPage_ignored;
+ public static String CVSFilePropertiesPage_notManaged;
+ public static String CVSFilePropertiesPage_isAdded;
+ public static String CVSFilePropertiesPage_baseRevision;
+ public static String CVSFilePropertiesPage_baseTimestamp;
+ public static String CVSFilePropertiesPage_modified;
+ public static String CVSFilePropertiesPage_keywordMode;
+ public static String CVSFilePropertiesPage_tag;
+ public static String CVSFilePropertiesPage_none;
+ public static String CVSFilePropertiesPage_version;
+ public static String CVSFilePropertiesPage_branch;
+ public static String CVSFilePropertiesPage_date;
+ public static String CVSFilePropertiesPage_error;
+ public static String CVSFolderPropertiesPage_ignored;
+ public static String CVSFolderPropertiesPage_notManaged;
+ public static String CVSFolderPropertiesPage_notCVSFolder;
+ public static String CVSFolderPropertiesPage_root;
+ public static String CVSFolderPropertiesPage_repository;
+ public static String CVSFolderPropertiesPage_static;
+ public static String CVSFolderPropertiesPage_disconnect;
+ public static String CVSFolderPropertiesPage_disconnectTitle;
+ public static String CVSFolderPropertiesPage_disconnectQuestion;
+
+ public static String CVSPropertiesPage_connectionType;
+ public static String CVSPropertiesPage_user;
+ public static String CVSPropertiesPage_password;
+ public static String CVSPropertiesPage_host;
+ public static String CVSPropertiesPage_port;
+ public static String CVSPropertiesPage_path;
+ public static String CVSPropertiesPage_module;
+ public static String CVSPropertiesPage_defaultPort;
+ public static String CVSPropertiesPage_tag;
+ public static String CVSPreferencesPage_0;
+ public static String CVSPreferencesPage_1;
+ public static String CVSPreferencesPage_2;
+ public static String CVSPreferencesPage_3;
+ public static String CVSPreferencesPage_4;
+ public static String CVSPreferencesPage_5;
+ public static String CVSPreferencesPage_6;
+ public static String CVSPreferencesPage_7;
+ public static String CVSPreferencesPage_8;
+ public static String CVSPreferencesPage_9;
+ public static String CVSPreferencesPage_10;
+ public static String CVSPreferencesPage_11;
+ public static String CVSPreferencesPage_12;
+ public static String CVSPreferencesPage_13;
+ public static String CVSPreferencesPage_14;
+ public static String CVSPreferencesPage_15;
+ public static String CVSPreferencesPage_16;
+ public static String CVSPreferencesPage_17;
+ public static String CVSPreferencesPage_18;
+ public static String CVSPreferencesPage_19;
+ public static String CVSPreferencesPage_23;
+ public static String CVSPreferencesPage_24;
+ public static String CVSPreferencesPage_25;
+ public static String CVSPreferencesPage_26;
+ public static String CVSPreferencesPage_27;
+ public static String CVSPreferencesPage_28;
+ public static String CVSPreferencesPage_29;
+ public static String CVSPreferencesPage_20;
+ public static String CVSPreferencesPage_21;
+ public static String CVSPreferencesPage_22;
+ public static String CVSPreferencesPage_30;
+ public static String CVSPreferencesPage_31;
+ public static String CVSPreferencesPage_32;
+ public static String CVSPreferencesPage_33;
+ public static String CVSPreferencesPage_34;
+ public static String CVSPreferencesPage_35;
+ public static String CVSPreferencesPage_36;
+ public static String CVSPreferencesPage_37;
+ public static String CVSPreferencesPage_38;
+ public static String CVSPreferencesPage_39;
+ public static String CVSPreferencesPage_40;
+ public static String CVSPreferencesPage_41;
+ public static String CVSPreferencesPage_42;
+ public static String CVSPreferencesPage_43;
+ public static String CVSPreferencesPage_44;
+ public static String CVSPreferencesPage_45;
+ public static String CVSPropertiesPage_virtualModule;
+
+
+ public static String CVSRemoteFilePropertySource_name;
+ public static String CVSRemoteFilePropertySource_revision;
+ public static String CVSRemoteFilePropertySource_date;
+ public static String CVSRemoteFilePropertySource_author;
+ public static String CVSRemoteFilePropertySource_comment;
+ public static String CVSRemoteFolderPropertySource_name;
+ public static String CVSRemoteFolderPropertySource_tag;
+ public static String CVSRemoteFolderPropertySource_none;
+
+ public static String CVSRepositoryLocationPropertySource_default;
+ public static String CVSRepositoryLocationPropertySource_host;
+ public static String CVSRepositoryLocationPropertySource_user;
+ public static String CVSRepositoryLocationPropertySource_port;
+ public static String CVSRepositoryLocationPropertySource_root;
+ public static String CVSRepositoryLocationPropertySource_method;
+
+ public static String CVSParticipant_0;
+ public static String CVSParticipant_1;
+ public static String CVSParticipant_2;
+ public static String CVSUIPlugin_refreshTitle;
+ public static String CVSUIPlugin_refreshQuestion;
+ public static String CVSUIPlugin_refreshMultipleQuestion;
+
+ public static String CVSAction_disabledTitle;
+ public static String CVSAction_disabledMessage;
+ public static String CVSAction_refreshTitle;
+ public static String CVSAction_refreshQuestion;
+ public static String CVSAction_refreshMultipleQuestion;
+
+ public static String CommitAction_commitFailed;
+ public static String CommitWizardCommitPage_0;
+ public static String CommitWizardCommitPage_2;
+ public static String CommitWizardCommitPage_3;
+ public static String CommitWizardCommitPage_4;
+ public static String CommitWizardCommitPage_1;
+ public static String CommitWizardCommitPage_5;
+ public static String CommitWizardFileTypePage_0;
+ public static String CommitWizardFileTypePage_2;
+ public static String CommitWizardFileTypePage_3;
+
+ public static String CommitSyncAction_questionRelease;
+ public static String CommitSyncAction_titleRelease;
+ public static String CommitSyncAction_releaseAll;
+ public static String CommitSyncAction_releasePart;
+ public static String CommitSyncAction_cancelRelease;
+ public static String CompareWithRevisionAction_compare;
+ public static String CompareWithRevisionAction_noRevisions;
+ public static String CompareWithRevisionAction_noRevisionsLong;
+ public static String CompareWithRevisionAction_fetching;
+
+ public static String CompareWithTagAction_message;
+ public static String CompareEditorInput_fileProgress;
+
+ public static String ConfigurationWizardAutoconnectPage_description;
+ public static String ConfigurationWizardAutoconnectPage_user;
+ public static String ConfigurationWizardAutoconnectPage_host;
+ public static String ConfigurationWizardAutoconnectPage_port;
+ public static String ConfigurationWizardAutoconnectPage_default;
+ public static String ConfigurationWizardAutoconnectPage_connectionType;
+ public static String ConfigurationWizardAutoconnectPage_repositoryPath;
+ public static String ConfigurationWizardAutoconnectPage_module;
+ public static String ConfigurationWizardAutoconnectPage_validate;
+ public static String ConfigurationWizardAutoconnectPage_noSyncInfo;
+ public static String ConfigurationWizardAutoconnectPage_noCVSDirectory;
+
+ public static String RepositorySelectionPage_description;
+ public static String RepositorySelectionPage_useExisting;
+ public static String RepositorySelectionPage_useNew;
+
+ public static String ConfigurationWizardMainPage_connection;
+ public static String ConfigurationWizardMainPage_userName;
+ public static String ConfigurationWizardMainPage_password;
+ public static String ConfigurationWizardMainPage_host;
+ public static String ConfigurationWizardMainPage_0;
+ public static String ConfigurationWizardMainPage_5;
+ public static String ConfigurationWizardMainPage_6;
+ public static String ConfigurationWizardMainPage_1;
+ public static String ConfigurationWizardMainPage_2;
+ public static String ConfigurationWizardMainPage_3;
+ public static String ConfigurationWizardMainPage_4;
+ public static String ConfigurationWizardMainPage_useDefaultPort;
+ public static String ConfigurationWizardMainPage_usePort;
+ public static String ConfigurationWizardMainPage_repositoryPath;
+ public static String ConfigurationWizardMainPage_invalidUserName;
+ public static String ConfigurationWizardMainPage_invalidHostName;
+ public static String ConfigurationWizardMainPage_invalidPort;
+ public static String ConfigurationWizardMainPage_invalidPathWithSpaces;
+ public static String ConfigurationWizardMainPage_invalidPathWithSlashes;
+ public static String ConfigurationWizardMainPage_invalidPathWithTrailingSlash;
+ public static String ConfigurationWizardMainPage_useNTFormat;
+
+ public static String Console_resultServerError;
+ public static String Console_resultException;
+ public static String Console_resultAborted;
+ public static String Console_resultOk;
+ public static String Console_resultTimeFormat;
+ public static String Console_couldNotFormatTime;
+ public static String Console_preExecutionDelimiter;
+ public static String Console_postExecutionDelimiter;
+ public static String Console_info;
+ public static String Console_warning;
+ public static String Console_error;
+
+ public static String AddToBranchAction_enterTag;
+ public static String AddToBranchAction_enterTagLong;
+
+ public static String GenerateCVSDiff_title;
+ public static String GenerateCVSDiff_pageTitle;
+ public static String GenerateCVSDiff_pageDescription;
+ public static String GenerateCVSDiff_overwriteTitle;
+ public static String GenerateCVSDiff_overwriteMsg;
+ public static String GenerateCVSDiff_error;
+ public static String GenerateCVSDiff_working;
+ public static String GenerateCVSDiff_noDiffsFoundMsg;
+ public static String GenerateCVSDiff_noDiffsFoundTitle;
+ public static String GenerateCVSDiff_1;
+ public static String GenerateCVSDiff_2;
+ public static String HistoryFilterDialog_title;
+ public static String HistoryFilterDialog_showMatching;
+ public static String HistoryFilterDialog_matchingAny;
+ public static String HistoryFilterDialog_matchingAll;
+ public static String HistoryFilterDialog_author;
+ public static String HistoryFilterDialog_comment;
+ public static String HistoryFilterDialog_fromDate;
+ public static String HistoryFilterDialog_toDate;
+
+ public static String HistoryView_getContentsAction;
+ public static String HistoryView_getRevisionAction;
+ public static String HistoryView_tagWithExistingAction;
+ public static String HistoryView_copy;
+ public static String HistoryView_revision;
+ public static String HistoryView_tags;
+ public static String HistoryView_date;
+ public static String HistoryView_author;
+ public static String HistoryView_comment;
+ public static String HistoryView_refreshLabel;
+ public static String HistoryView_refresh;
+ public static String HistoryView_linkWithLabel;
+ public static String HistoryView_selectAll;
+ public static String HistoryView_showComment;
+ public static String HistoryView_wrapComment;
+ public static String HistoryView_showTags;
+ public static String HistoryView_overwriteTitle;
+ public static String HistoryView_overwriteMsg;
+ public static String HistoryView_fetchHistoryJob;
+ public static String HistoryView_errorFetchingEntries;
+
+ public static String IgnoreAction_ignore;
+
+ public static String MergeWizard_title;
+ public static String MergeWizard_0;
+ public static String MergeWizard_1;
+ public static String MergeWizardPage_0;
+ public static String MergeWizardPage_1;
+ public static String MergeWizardPage_2;
+ public static String MergeWizardPage_3;
+ public static String MergeWizardPage_4;
+ public static String MergeWizardPage_5;
+ public static String MergeWizardPage_6;
+ public static String MergeWizardPage_7;
+ public static String MergeWizardPage_8;
+ public static String MergeWizardPage_9;
+ public static String MergeWizardPage_10;
+ public static String MergeWizardPage_11;
+ public static String MergeWizardPage_12;
+ public static String MergeWizardPage_13;
+ public static String MergeWizardEndPage_branches;
+
+ public static String ModuleSelectionPage_moduleIsProject;
+ public static String ModuleSelectionPage_specifyModule;
+
+ public static String ModeWizardSelectionPage_10;
+ public static String ModeWizardSelectionPage_11;
+ public static String ModeWizardSelectionPage_12;
+ public static String ModeWizardSelectionPage_13;
+ public static String ModeWizardSelectionPage_14;
+ public static String ModeWizardSelectionPage_15;
+ public static String ModeWizardSelectionPage_17;
+ public static String ModeWizardSelectionPage_18;
+ public static String ModeWizardSelectionPage_19;
+ public static String ModeWizardSelectionPage_20;
+ public static String ModeWizardSelectionPage_21;
+ public static String ModeWizardSelectionPage_22;
+ public static String ModeWizardSelectionPage_23;
+ public static String ModeWizardSelectionPage_24;
+ public static String ModeWizardSelectionPage_25;
+
+ public static String MoveTagAction_title;
+ public static String MoveTagAction_message;
+
+ public static String NewLocationWizard_title;
+ public static String NewLocationWizard_heading;
+ public static String NewLocationWizard_description;
+ public static String NewLocationWizard_validationFailedText;
+ public static String NewLocationWizard_validationFailedTitle;
+ public static String NewLocationWizard_exception;
+
+ public static String OpenLogEntryAction_deletedTitle;
+ public static String OpenLogEntryAction_deleted;
+
+ public static String ReleaseCommentDialog_title;
+ public static String ReleaseCommentDialog_unaddedResources;
+ public static String ReleaseCommentDialog_selectAll;
+ public static String ReleaseCommentDialog_deselectAll;
+ public static String RemoteFolderElement_nameAndTag;
+ public static String RemoteFolderElement_fetchingRemoteChildren;
+
+ public static String ReplaceWithTagAction_message;
+ public static String ReplaceWithTagAction_replace;
+ public static String ReplaceWithRemoteAction_problemMessage;
+
+ public static String ReplaceWithAction_confirmOverwrite;
+ public static String ReplaceWithAction_localChanges;
+ public static String ReplaceWithAction_calculatingDirtyResources;
+
+ public static String ReplaceWithLatestAction_multipleTags;
+ public static String ReplaceWithLatestAction_multipleVersions;
+ public static String ReplaceWithLatestAction_multipleBranches;
+ public static String ReplaceWithLatestAction_singleVersion;
+ public static String ReplaceWithLatestAction_singleBranch;
+ public static String ReplaceWithLatestAction_singleHEAD;
+
+ public static String RepositoryManager_committing;
+ public static String RepositoryManager_rename;
+ public static String RepositoryManager_save;
+ public static String RepositoryManager_ioException;
+ public static String RepositoryManager_parsingProblem;
+ public static String RepositoryManager_fetchingRemoteFolders;
+
+ public static String RepositoriesView_refresh;
+ public static String RepositoriesView_refreshTooltip;
+ public static String RepositoriesView_new;
+ public static String RepositoriesView_newSubmenu;
+ public static String RepositoriesView_newAnonCVS;
+ public static String RepositoriesView_newWorkingSet;
+ public static String RepositoriesView_deselectWorkingSet;
+ public static String RepositoriesView_editWorkingSet;
+ public static String RepositoriesView_workingSetMenuItem;
+ public static String RepositoriesView_collapseAll;
+ public static String RepositoriesView_collapseAllTooltip;
+ public static String RepositoriesView_NItemsSelected;
+ public static String RepositoriesView_OneItemSelected;
+ public static String RepositoriesView_ResourceInRepository;
+ public static String RepositoriesView_CannotGetRevision;
+ public static String RemoteViewPart_workingSetToolTip;
+
+ public static String ResourcePropertiesPage_status;
+ public static String ResourcePropertiesPage_notManaged;
+ public static String ResourcePropertiesPage_versioned;
+ public static String ResourcePropertiesPage_notVersioned;
+ //ResourcePropertiesPage.baseRevision=Base Revision
+ //ResourcePropertiesPage.none=none
+ public static String ResourcePropertiesPage_error;
+
+ public static String SharingWizard_autoConnectTitle;
+ public static String SharingWizard_autoConnectTitleDescription;
+ public static String SharingWizard_selectTagTitle;
+ public static String SharingWizard_selectTag;
+ public static String SharingWizard_importTitle;
+ public static String SharingWizard_importTitleDescription;
+ public static String SharingWizard_title;
+ public static String SharingWizard_enterInformation;
+ public static String SharingWizard_enterInformationDescription;
+ public static String SharingWizard_enterModuleName;
+ public static String SharingWizard_enterModuleNameDescription;
+ public static String SharingWizard_validationFailedText;
+ public static String SharingWizard_validationFailedTitle;
+
+ public static String ShowHistoryAction_showHistory;
+ public static String SyncAction_noChangesTitle;
+ public static String SyncAction_noChangesMessage;
+
+ public static String TagAction_tagErrorTitle;
+ public static String TagAction_tagWarningTitle;
+ public static String TagAction_tagProblemsMessage;
+ public static String TagAction_tagProblemsMessageMultiple;
+ public static String TagAction_tagResources;
+ public static String TagRefreshButtonArea_0;
+ public static String TagRefreshButtonArea_1;
+ public static String TagRefreshButtonArea_2;
+ public static String TagRefreshButtonArea_3;
+ public static String TagRefreshButtonArea_4;
+ public static String TagRefreshButtonArea_5;
+ public static String TagRefreshButtonArea_6;
+ public static String TagRefreshButtonArea_7;
+ public static String TagAction_enterTag;
+ public static String TagAction_moveTag;
+ public static String TagRootElement_0;
+ public static String TagLocalAction_0;
+ public static String TagLocalAction_1;
+ public static String TagLocalAction_2;
+ public static String TagAction_moveTagConfirmTitle;
+ public static String TagAction_moveTagConfirmMessage;
+ public static String TagAction_uncommittedChangesTitle;
+ public static String TagAction_uncommittedChanges;
+ public static String TagAction_existingVersions;
+
+ public static String TagInRepositoryAction_tagProblemsMessage;
+ public static String TagInRepositoryAction_tagProblemsMessageMultiple;
+
+ public static String UpdateAction_update;
+ public static String UpdateAction_promptForUpdateSeveral;
+ public static String UpdateAction_promptForUpdateOne;
+ public static String UpdateAction_promptForUpdateTitle;
+
+ public static String UpdateWizard_title;
+ public static String UpdateWizard_0;
+ public static String UpdateWizard_1;
+ public static String UserValidationDialog_required;
+ public static String UserValidationDialog_labelUser;
+ public static String UserValidationDialog_labelPassword;
+ public static String UserValidationDialog_password;
+ public static String UserValidationDialog_user;
+
+ public static String KeyboradInteractiveDialog_message;
+ public static String KeyboardInteractiveDialog_labelRepository;
+
+ public static String VersionsElement_versions;
+
+ public static String WorkbenchUserAuthenticator_cancelled;
+ public static String WorkbenchUserAuthenticator_1;
+ public static String WorkbenchUserAuthenticator_2;
+ public static String Unmanage_title;
+ public static String Unmanage_titleN;
+ public static String Unmanage_option1;
+ public static String Unmanage_option2;
+ public static String Unmanage_unmanagingError;
+
+ public static String Unmanage_message;
+ public static String Unmanage_messageN;
+
+ public static String Save_To_Clipboard_2;
+ public static String Save_In_File_System_3;
+ public static String Browse____4;
+ public static String Save_Patch_As_5;
+ public static String patch_txt_6;
+ public static String Save_In_Workspace_7;
+ public static String Select_a_folder_then_type_in_the_file_name__8;
+ public static String Fi_le_name__9;
+ public static String Diff_output_format_12;
+ public static String Unified__format_required_by_Compare_With_Patch_feature__13;
+ public static String Context_14;
+ public static String Standard_15;
+ public static String Advanced_options_19;
+ public static String Configure_the_options_used_for_the_CVS_diff_command_20;
+
+ public static String TagSelectionDialog_Select_a_Tag_1;
+ public static String TagSelectionDialog_recurseOption;
+ public static String TagSelectionDialog_0;
+ public static String TagSelectionDialog_1;
+ public static String TagSelectionDialog_7;
+ public static String TagSelectionDialog_8;
+
+ public static String TagSelectionArea_0;
+ public static String TagSelectionArea_1;
+ public static String TagSelectionArea_2;
+ public static String TagSelectionArea_3;
+ public static String TagSelectionWizardPage_0;
+ public static String TagSelectionWizardPage_1;
+
+ public static String ExtMethodPreferencePage_message;
+ public static String ExtMethodPreferencePage_CVS_RSH;
+ public static String ExtMethodPreferencePage_Browse;
+ public static String ExtMethodPreferencePage_0;
+ public static String ExtMethodPreferencePage_2;
+ public static String ExtMethodPreferencePage_1;
+ public static String ExtMethodPreferencePage_Details;
+ public static String ExtMethodPreferencePage_CVS_RSH_Parameters;
+ public static String ExtMethodPreferencePage_CVS_SERVER__7;
+ public static String UpdateMergeActionProblems_merging_remote_resources_into_workspace_1;
+ public static String TagConfigurationDialog_1;
+ public static String TagConfigurationDialog_5;
+ public static String TagConfigurationDialog_6;
+ public static String TagConfigurationDialog_7;
+ public static String TagConfigurationDialog_8;
+ public static String TagConfigurationDialog_9;
+ public static String TagConfigurationDialog_0;
+ public static String TagConfigurationDialog_10;
+ public static String TagConfigurationDialog_11;
+ public static String TagConfigurationDialog_12;
+ public static String TagConfigurationDialog_13;
+ public static String TagConfigurationDialog_14;
+ public static String TagConfigurationDialog_20;
+ public static String TagConfigurationDialog_21;
+ public static String TagConfigurationDialog_22;
+ public static String TagConfigurationDialog_AddDateTag;
+
+ public static String ConfigureTagsFromRepoViewConfigure_Tag_Error_1;
+ public static String RemoteRootAction_label;
+ public static String RemoteLogOperation_0;
+ public static String RemoteLogOperation_1;
+ public static String RemoveDateTagAction_0;
+ public static String RemoteRootAction_Unable_to_Discard_Location_1;
+ public static String RemoteRootAction_Projects_in_the_local_workspace_are_shared_with__2;
+ public static String RemoteRootAction_The_projects_that_are_shared_with_the_above_repository_are__4;
+
+ public static String BranchCategory_Branches_1;
+ public static String VersionCategory_Versions_1;
+ public static String HistoryView_______4;
+
+ public static String CVSProjectPropertiesPage_connectionType;
+ public static String CVSProjectPropertiesPage_user;
+ public static String CVSProjectPropertiesPage_Select_a_Repository_1;
+ public static String CVSProjectPropertiesPage_Select_a_CVS_repository_location_to_share_the_project_with__2;
+ public static String CVSProjectPropertiesPage_Change_Sharing_5;
+ public static String CVSProjectPropertiesPage_fetchAbsentDirectoriesOnUpdate;
+ public static String CVSProjectPropertiesPage_configureForWatchEdit;
+ public static String CVSProjectPropertiesPage_progressTaskName;
+ public static String CVSProjectPropertiesPage_setReadOnly;
+ public static String CVSProjectPropertiesPage_clearReadOnly;
+ public static String CVSRepositoryPropertiesPage_Confirm_Project_Sharing_Changes_1;
+ public static String CVSRepositoryPropertiesPage_There_are_projects_in_the_workspace_shared_with_this_repository_2;
+ public static String CVSRepositoryPropertiesPage_sharedProject;
+ public static String CVSRepositoryPropertiesPage_useLocationAsLabel;
+ public static String CVSRepositoryPropertiesPage_useCustomLabel;
+
+ public static String CVSProjectSetSerializer_Confirm_Overwrite_Project_8;
+ public static String CVSProjectSetSerializer_The_project__0__already_exists__Do_you_wish_to_overwrite_it__9;
+
+ public static String IgnoreResourcesDialog_titleSingle;
+ public static String IgnoreResourcesDialog_titleMany;
+ public static String IgnoreResourcesDialog_prompt;
+ public static String IgnoreResourcesDialog_addNameEntryButton;
+ public static String IgnoreResourcesDialog_addNameEntryExample;
+ public static String IgnoreResourcesDialog_addExtensionEntryButton;
+ public static String IgnoreResourcesDialog_addExtensionEntryExample;
+ public static String IgnoreResourcesDialog_addCustomEntryButton;
+ public static String IgnoreResourcesDialog_addCustomEntryExample;
+ public static String IgnoreResourcesDialog_patternMustNotBeEmpty;
+ public static String IgnoreResourcesDialog_patternDoesNotMatchFile;
+
+ public static String CVSProjectPropertiesPage_You_can_change_the_sharing_of_this_project_to_another_repository_location__However__this_is_only_possible_if_the_new_location_is___compatible____on_the_same_host_with_the_same_repository_path___1;
+
+ public static String ConfigurationWizardMainPage_Location_1;
+ public static String ConfigurationWizardMainPage_Authentication_2;
+ public static String ConfigurationWizardMainPage_Connection_3;
+ public static String AlternateUserValidationDialog_Enter_Password_2;
+ public static String AlternateUserValidationDialog_OK_6;
+ public static String AlternateUserValidationDialog_Cancel_7;
+ public static String AlternateUserValidationDialog_message;
+ public static String WorkbenchUserAuthenticator_The_operation_was_canceled_by_the_user_1;
+ public static String WorkingSetSelectionArea_workingSetOther;
+ public static String ListSelectionArea_selectAll;
+ public static String ListSelectionArea_deselectAll;
+
+ public static String RestoreFromRepositoryWizard_fileSelectionPageTitle;
+ public static String RestoreFromRepositoryWizard_fileSelectionPageDescription;
+ public static String RestoreFromRepositoryFileSelectionPage_fileSelectionPaneTitle;
+ public static String RestoreFromRepositoryFileSelectionPage_revisionSelectionPaneTitle;
+ public static String RestoreFromRepositoryFileSelectionPage_fileToRestore;
+ public static String RestoreFromRepositoryFileSelectionPage_fileContentPaneTitle;
+ public static String RestoreFromRepositoryFileSelectionPage_emptyRevisionPane;
+ public static String RestoreFromRepositoryFileSelectionPage_fileExists;
+ public static String RestoreFromRepositoryFileSelectionPage_revisionIsDeletion;
+ public static String RestoreFromRepositoryAction_noFilesTitle;
+ public static String RestoreFromRepositoryAction_noFilesMessage;
+
+ public static String RepositoryRoot_folderInfoMissing;
+
+ public static String RepositoriesViewContentHandler_unmatchedTag;
+ public static String RepositoriesViewContentHandler_missingAttribute;
+ public static String RepositoriesViewContentHandler_errorCreatingRoot;
+
+ public static String WatchEditPreferencePage_description;
+ public static String WatchEditPreferencePage_checkoutReadOnly;
+ public static String WatchEditPreferencePage_validateEditSaveAction;
+ public static String WatchEditPreferencePage_edit;
+ public static String WatchEditPreferencePage_editInBackground;
+ public static String WatchEditPreferencePage_highjack;
+ public static String WatchEditPreferencePage_editPrompt;
+ public static String WatchEditPreferencePage_neverPrompt;
+ public static String WatchEditPreferencePage_alwaysPrompt;
+ public static String WatchEditPreferencePage_onlyPrompt;
+ public static String WatchEditPreferencePage_updatePrompt;
+ public static String WatchEditPreferencePage_autoUpdate;
+ public static String WatchEditPreferencePage_promptUpdate;
+ public static String WatchEditPreferencePage_neverUpdate;
+ public static String WatchEditPreferencePage_0;
+
+ public static String Uneditaction_confirmMessage;
+ public static String Uneditaction_confirmTitle;
+
+ public static String FileModificationValidator_vetoMessage;
+
+ public static String RefreshRemoteProjectWizard_title;
+ public static String RefreshRemoteProjectWizard_0;
+ public static String RefreshRemoteProjectWizard_1;
+ public static String RefreshRemoteProjectWizard_2;
+ public static String RefreshRemoteProjectWizard_3;
+ public static String RefreshRemoteProjectWizard_4;
+ public static String RefreshRemoteProjectSelectionPage_pageTitle;
+ public static String RefreshRemoteProjectSelectionPage_pageDescription;
+ public static String RefreshRemoteProjectSelectionPage_selectRemoteProjects;
+ public static String RefreshRemoteProjectSelectionPage_noWorkingSet;
+ public static String RefreshRemoteProjectSelectionPage_workingSet;
+
+ public static String EditorsView_file;
+ public static String EditorsView_user;
+ public static String EditorsView_date;
+ public static String EditorsView_computer;
+
+ public static String EditorsDialog_title;
+ public static String EditorsDialog_question;
+ public static String EditorsAction_classNotInitialized;
+
+ public static String RemoteFileEditorInput_fullPathAndRevision;
+
+ public static String CheckoutOperation_thisResourceExists;
+ public static String CheckoutOperation_thisExternalFileExists;
+ public static String CheckoutOperation_confirmOverwrite;
+ public static String CheckoutOperation_scrubbingProject;
+ public static String CheckoutOperation_refreshingProject;
+
+ public static String CheckoutSingleProjectOperation_taskname;
+ public static String CheckoutMultipleProjectsOperation_taskName;
+
+ public static String CheckoutIntoOperation_taskname;
+ public static String CheckoutIntoOperation_targetIsFile;
+ public static String CheckoutIntoOperation_targetIsFolder;
+ public static String CheckoutIntoOperation_targetIsPrunedFolder;
+ public static String CheckoutIntoOperation_mappingAlreadyExists;
+ public static String CheckoutIntoOperation_cancelled;
+ public static String CheckoutIntoOperation_overwriteMessage;
+
+ public static String CheckoutAsWizard_title;
+ public static String CheckoutAsWizard_error;
+ public static String CheckoutAsMainPage_title;
+ public static String CheckoutAsMainPage_description;
+ public static String CheckoutAsMainPage_singleFolder;
+ public static String CheckoutAsMainPage_asConfiguredProject;
+ public static String CheckoutAsMainPage_asSimpleProject;
+ public static String CheckoutAsMainPage_projectNameLabel;
+ public static String CheckoutAsMainPage_multipleFolders;
+ public static String CheckoutAsMainPage_asProjects;
+ public static String CheckoutAsMainPage_intoProject;
+
+ public static String CheckoutAsLocationSelectionPage_title;
+ public static String CheckoutAsLocationSelectionPage_description;
+ public static String CheckoutAsLocationSelectionPage_useDefaultLabel;
+ public static String CheckoutAsLocationSelectionPage_locationLabel;
+ public static String CheckoutAsLocationSelectionPage_parentDirectoryLabel;
+ public static String CheckoutAsLocationSelectionPage_browseLabel;
+ public static String CheckoutAsLocationSelectionPage_locationEmpty;
+ public static String CheckoutAsLocationSelectionPage_invalidLocation;
+ public static String CheckoutAsLocationSelectionPage_messageForSingle;
+ public static String CheckoutAsLocationSelectionPage_messageForMulti;
+
+ public static String CheckoutAsProjectSelectionPage_title;
+ public static String CheckoutAsProjectSelectionPage_description;
+ public static String CheckoutAsProjectSelectionPage_name;
+ public static String CheckoutAsProjectSelectionPage_treeLabel;
+ public static String CheckoutAsProjectSelectionPage_showLabel;
+ public static String CheckoutAsProjectSelectionPage_recurse;
+ public static String CheckoutAsProjectSelectionPage_showAll;
+ public static String CheckoutAsProjectSelectionPage_showUnshared;
+ public static String CheckoutAsProjectSelectionPage_showSameRepo;
+ public static String CheckoutAsProjectSelectionPage_invalidFolderName;
+
+ public static String WorkspaceChangeSetCapability_1;
+ public static String OpenCommitSetAction_20;
+ public static String OpenCommitSetAction_21;
+ public static String WorkspaceChangeSetCapability_2;
+ public static String WorkspaceChangeSetCapability_3;
+ public static String CVSChangeSetCollector_4;
+ public static String CVSChangeSetCollector_0;
+ public static String WorkspaceChangeSetCapability_7;
+ public static String WorkspaceChangeSetCapability_8;
+
+ public static String ProjectMetaFile_taskName;
+ public static String TagFromWorkspace_taskName;
+ public static String TagFromRepository_taskName;
+ public static String UpdateOnlyMergeable_taskName;
+ public static String UpdateDialog_overwriteTitle;
+ public static String UpdateDialog_overwriteMessage;
+ public static String ReplaceOperation_taskName;
+ public static String UpdateOperation_taskName;
+
+ public static String SafeUpdateAction_warnFilesWithConflictsTitle;
+ public static String SafeUpdateAction_warnFilesWithConflictsDescription;
+
+ public static String ShowAnnotationAction_2;
+ public static String ShowAnnotationAction_3;
+
+ public static String UpdateAction_jobName;
+ public static String MergeUpdateAction_jobName;
+ public static String MergeUpdateAction_invalidSubscriber;
+ public static String CommitAction_jobName;
+
+ public static String CommitCommentArea_0;
+ public static String CommitCommentArea_1;
+ public static String CommitCommentArea_2;
+ public static String CommitCommentArea_3;
+ public static String CommitCommentArea_4;
+ public static String CommitCommentArea_5;
+ public static String CommitCommentArea_6;
+
+ public static String CommentTemplatesPreferencePage_Description;
+ public static String CommentTemplatesPreferencePage_New;
+ public static String CommentTemplatesPreferencePage_Edit;
+ public static String CommentTemplatesPreferencePage_Remove;
+ public static String CommentTemplatesPreferencePage_Preview;
+ public static String CommentTemplatesPreferencePage_EditCommentTemplateTitle;
+ public static String CommentTemplatesPreferencePage_EditCommentTemplateMessage;
+
+ public static String CheckoutProjectOperation_8;
+ public static String CheckoutProjectOperation_9;
+ public static String CheckoutProjectOperation_0;
+ public static String CheckoutProjectOperation_1;
+ public static String CVSOperation_0;
+ public static String CVSOperation_1;
+ public static String CVSOperation_2;
+ public static String CVSModelElement_0;
+ public static String CVSModelElement_1;
+ public static String CVSDecorator_exceptionMessage;
+ public static String FetchMembersOperation_0;
+
+ public static String RemoteRevisionQuickDiffProvider_readingFile;
+ public static String RemoteRevisionQuickDiffProvider_closingFile;
+ public static String RemoteRevisionQuickDiffProvider_fetchingFile;
+ public static String RemoteCompareOperation_0;
+
+ public static String RefreshDirtyStateOperation_0;
+ public static String RefreshDirtyStateOperation_1;
+ public static String IgnoreAction_0;
+ public static String IgnoreAction_1;
+ public static String GenerateDiffFileOperation_0;
+ public static String GenerateDiffFileOperation_1;
+ public static String GenerateDiffFileOperation_2;
+ public static String DiffOperation_0;
+ public static String DiffOperation_1;
+ public static String GenerateDiffFileWizard_6;
+ public static String GenerateDiffFileWizard_7;
+ public static String GenerateDiffFileWizard_8;
+ public static String GenerateDiffFileWizard_9;
+ public static String GenerateDiffFileWizard_10;
+ public static String GenerateDiffFileWizard_File_multisegments;
+ public static String GenerateDiffFileWizard_SelectAll;
+ public static String GenerateDiffFileWizard_DeselectAll;
+ public static String GenerateDiffFileWizard_0;
+ public static String GenerateDiffFileWizard_2;
+ public static String GenerateDiffFileWizard_3;
+ public static String GenerateDiffFileWizard_4;
+ public static String GenerateDiffFileWizard_5;
+ public static String MergeSynchronizeParticipant_8;
+ public static String MergeSynchronizeParticipant_9;
+ public static String MergeSynchronizeParticipant_10;
+ public static String MergeSynchronizeParticipant_11;
+ public static String MergeSynchronizeParticipant_12;
+ public static String DisconnectOperation_0;
+ public static String DisconnectOperation_1;
+ public static String SubscriberConfirmMergedAction_0;
+ public static String SubscriberConfirmMergedAction_jobName;
+ public static String CVSSubscriberAction_0;
+ public static String ReconcileProjectOperation_0;
+ public static String CheckoutToRemoteFolderOperation_0;
+ public static String CVSRepositoryPropertiesPage_0;
+ public static String CVSRepositoryPropertiesPage_1;
+ public static String CompareRevertAction_0;
+ public static String CompareParticipant_0;
+
+ public static String ComparePreferencePage_0;
+ public static String ComparePreferencePage_1;
+ public static String ComparePreferencePage_2;
+ public static String ComparePreferencePage_3;
+ public static String ComparePreferencePage_4;
+ public static String ComparePreferencePage_6;
+
+ public static String FileModificationValidator_3;
+ public static String FileModificationValidator_4;
+ public static String FileModificationValidator_5;
+ public static String FileModificationValidator_6;
+ public static String CVSSynchronizeWizard_0;
+ public static String Participant_comparing;
+ public static String Participant_merging;
+ public static String CompareWithRevisionAction_4;
+ public static String ReplaceWithRevisionAction_0;
+ public static String ReplaceWithRevisionAction_1;
+
+ public static String ConsolePreferencesPage_4;
+ public static String ConsolePreferencesPage_5;
+ public static String ConsolePreferencesPage_6;
+ public static String ConsolePreferencesPage_7;
+ public static String ConsolePreferencesPage_8;
+ public static String ConsolePreferencesPage_9;
+
+ public static String SharingWizard_23;
+ public static String SharingWizard_24;
+ public static String SharingWizard_25;
+ public static String ReconcileProjectOperation_1;
+ public static String ReconcileProjectOperation_2;
+ public static String ShareProjectOperation_0;
+ public static String SharingWizard_26;
+ public static String SharingWizard_27;
+ public static String SharingWizardSyncPage_3;
+ public static String SharingWizardSyncPage_4;
+ public static String SharingWizardSyncPage_5;
+ public static String SharingWizardSyncPage_8;
+ public static String SharingWizardSyncPage_9;
+ public static String SharingWizardSyncPage_12;
+ public static String ShareProjectOperation_1;
+ public static String ShareProjectOperation_2;
+ public static String ShareProjectOperation_3;
+ public static String CVSProjectPropertiesPage_31;
+ public static String CVSProjectPropertiesPage_32;
+ public static String CVSProjectPropertiesPage_33;
+ public static String RepositoryEncodingPropertyPage_2;
+ public static String RepositoryEncodingPropertyPage_3;
+ public static String RepositoryEncodingPropertyPage_0;
+ public static String RepositoryEncodingPropertyPage_1;
+ public static String RepositoryEncodingPropertyPage_4;
+ public static String CheckoutWizard_7;
+ public static String CheckoutWizard_8;
+ public static String CheckoutWizard_0;
+ public static String CheckoutWizard_10;
+ public static String CheckoutWizard_11;
+ public static String ModuleSelectionPage_2;
+ public static String CheckoutAsWizard_3;
+ public static String CheckoutAsWizard_4;
+ public static String CheckoutAsMainPage_10;
+ public static String CVSTeamProvider_updatingFile;
+ public static String CVSTeamProvider_makeBranch;
+ public static String CVSTeamProvider_folderInfo;
+ public static String CVSTeamProvider_updatingFolder;
+ public static String AddOperation_0;
+ public static String BranchOperation_0;
+ public static String BranchOperation_1;
+ public static String CommitOperation_0;
+ public static String CommitSetDialog_0;
+ public static String CommitSetDialog_2;
+ public static String CommitSetDialog_3;
+ public static String CommitWizard_0;
+ public static String CommitWizard_1;
+ public static String CommitWizard_2;
+ public static String CommitWizard_3;
+ public static String CommitWizard_4;
+ public static String CommitWizard_6;
+ public static String CommitWizard_7;
+ public static String UpdateOperation_0;
+ public static String ReplaceOperation_0;
+ public static String ReplaceOperation_1;
+ public static String TagOperation_0;
+ public static String RemoteAnnotationStorage_1;
+ public static String DateTagCategory_0;
+ public static String DateTagDialog_0;
+ public static String DateTagDialog_1;
+ public static String DateTagDialog_2;
+ public static String DateTagDialog_3;
+ public static String DateTagDialog_4;
+ public static String DateTagDialog_5;
+ public static String LogEntryCacheUpdateHandler_0;
+ public static String LogEntryCacheUpdateHandler_1;
+ public static String LogEntryCacheUpdateHandler_2;
+ public static String MultiFolderTagSource_0;
+ public static String LocalProjectTagSource_0;
+ public static String AnnotateView_0;
+ public static String ModeWizard_0;
+ public static String ModeWizard_1;
+ public static String ModeWizard_2;
+ public static String ModeWizard_3;
+ public static String ModeWizard_4;
+ public static String ModeWizard_5;
+ public static String ModeWizard_6;
+
+ public static String ModeWizardSelectionPage_2;
+ public static String ModeWizardSelectionPage_3;
+ public static String ModeWizardSelectionPage_4;
+ public static String ModeWizardSelectionPage_8;
+ public static String ModeWizardSelectionPage_9;
+
+ public static String ReplaceWithTagAction_0;
+ public static String ReplaceWithTagAction_1;
+ public static String ReplaceWithTagAction_2;
+ public static String UncommittedChangesDialog_2;
+ public static String UncommittedChangesDialog_3;
+ public static String UncommittedChangesDialog_4;
+ public static String AddWizard_0;
+
+ public static String OpenChangeSetAction_0;
+ public static String OpenChangeSetAction_1;
+
+ public static String WorkInProgress_EnableModelUpdate;
+ public static String CVSMappingMergeOperation_MergeInfoTitle;
+ public static String CVSMappingMergeOperation_MergeInfoText;
+
+ public static String WorkInProgressPage_0;
+ public static String WorkInProgressPage_1;
+ public static String WorkInProgressPage_2;
+ public static String FetchAllMembersOperation_0;
+ public static String CacheTreeContentsOperation_0;
+ public static String CacheTreeContentsOperation_1;
+ public static String CVSMergeContext_0;
+ public static String CVSMergeContext_1;
+ public static String CVSMergeContext_2;
+ public static String UpdateMergePreferencePage_0;
+ public static String UpdateMergePreferencePage_1;
+ public static String UpdateMergePreferencePage_2;
+ public static String UpdateMergePreferencePage_3;
+ public static String WorkspaceSubscriberContext_0;
+ public static String ModelReplaceOperation_0;
+ public static String ModelReplaceOperation_1;
+ public static String ModelReplaceOperation_2;
+ public static String ModelReplaceOperation_3;
+ public static String MergeWizardPage_14;
+ public static String CVSHistoryFilterDialog_showLocalRevisions;
+ public static String CVSHistoryTableProvider_base;
+ public static String CVSHistoryTableProvider_currentVersion;
+ public static String ComparePreferencePage_7;
+ public static String WorkspaceTraversalAction_0;
+ public static String OutgoingChangesDialog_0;
+ public static String OutgoingChangesDialog_1;
+ public static String SyncAction_0;
+ public static String ModelCompareOperation_0;
+ public static String CVSHistoryPage_LocalModeAction;
+ public static String CVSHistoryPage_LocalModeTooltip;
+ public static String CVSHistoryPage_RemoteModeAction;
+ public static String CVSHistoryPage_RemoteModeTooltip;
+ public static String CVSHistoryPage_NoRevisions;
+ public static String CVSHistoryPage_CombinedModeAction;
+ public static String CVSHistoryPage_CombinedModeTooltip;
+ public static String CVSHistoryPage_CompareRevisionAction;
+ public static String CVSHistoryPage_CompareModeToggleAction;
+ public static String CVSHistoryPage_FilterHistoryTooltip;
+ public static String CVSHistoryPage_OpenAction;
+ public static String CVSHistoryPage_GroupByDate;
+ public static String CVSHistoryPage_Today;
+ public static String CVSHistoryPage_Yesterday;
+ public static String CVSHistoryPage_ThisMonth;
+ public static String CVSHistoryPage_Previous;
+ public static String CVSHistoryPage_NoRevisionsForMode;
+ public static String CVSHistoryPage_NoFilter;
+
+ public static String CVSProxyPreferencePage_enableProxy;
+ public static String CVSProxyPreferencePage_proxyTpe;
+ public static String CVSProxyPreferencePage_proxyHost;
+ public static String CVSProxyPreferencePage_proxyPort;
+ public static String CVSProxyPreferencePage_enableProxyAuth;
+ public static String CVSProxyPreferencePage_proxyUser;
+ public static String CVSProxyPreferencePage_proxyPass;
+ public static String CVSProxyPreferencePage_proxyPortError;
+
+ public static String NewLocationWizard_1;
+ public static String NewLocationWizard_2;
+ public static String NewLocationWizard_3;
+ public static String NewLocationWizard_4;
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
new file mode 100644
index 000000000..4d43ac07f
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -0,0 +1,746 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Philippe Ombredanne - bug 84808
+ *******************************************************************************/
+
+package org.eclipse.team.internal.ccvs.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.internal.ccvs.core.*;
+import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
+import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
+import org.eclipse.team.internal.ccvs.ui.console.CVSOutputConsole;
+import org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory;
+import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
+import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
+import org.eclipse.team.internal.core.subscribers.ActiveChangeSetManager;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * UI Plugin for CVS provider-specific workbench functionality.
+ */
+public class CVSUIPlugin extends AbstractUIPlugin {
+ /**
+ * The id of the CVS plug-in
+ */
+ public static final String ID = "org.eclipse.team.cvs.ui"; //$NON-NLS-1$
+ public static final String DECORATOR_ID = "org.eclipse.team.cvs.ui.decorator"; //$NON-NLS-1$
+
+ /**
+ * Property constant indicating the decorator configuration has changed.
+ */
+ public static final String P_DECORATORS_CHANGED = CVSUIPlugin.ID + ".P_DECORATORS_CHANGED"; //$NON-NLS-1$
+
+ private Hashtable imageDescriptors = new Hashtable(20);
+ private static List propertyChangeListeners = new ArrayList(5);
+
+ /**
+ * The singleton plug-in instance
+ */
+ private static CVSUIPlugin plugin;
+
+ /**
+ * The CVS console
+ */
+ private CVSOutputConsole console;
+
+ /**
+ * The repository manager
+ */
+ private RepositoryManager repositoryManager;
+
+ /**
+ * CVSUIPlugin constructor
+ *
+ * @param descriptor the plugin descriptor
+ */
+ public CVSUIPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * Returns the standard display to be used. The method first checks, if
+ * the thread calling this method has an associated display. If so, this
+ * display is returned. Otherwise the method returns the default display.
+ */
+ public static Display getStandardDisplay() {
+ Display display= Display.getCurrent();
+ if (display == null) {
+ display= Display.getDefault();
+ }
+ return display;
+ }
+
+ /**
+ * Creates an image and places it in the image registry.
+ */
+ protected void createImageDescriptor(String id) {
+ URL url = FileLocator.find(CVSUIPlugin.getPlugin().getBundle(), new Path(ICVSUIConstants.ICON_PATH + id), null);
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ imageDescriptors.put(id, desc);
+ }
+
+ /**
+ * Returns the active workbench page. Note that the active page may not be
+ * the one that the user perceives as active in some situations so this
+ * method of obtaining the activate page should only be used if no other
+ * method is available.
+ *
+ * @return the active workbench page
+ */
+ public static IWorkbenchPage getActivePage() {
+ return TeamUIPlugin.getActivePage();
+ }
+
+ /**
+ * Register for changes made to Team properties.
+ */
+ public static void addPropertyChangeListener(IPropertyChangeListener listener) {
+ propertyChangeListeners.add(listener);
+ }
+
+ /**
+ * Remove a Team property changes.
+ */
+ public static void removePropertyChangeListener(IPropertyChangeListener listener) {
+ propertyChangeListeners.remove(listener);
+ }
+
+ /**
+ * Broadcast a Team property change.
+ */
+ public static void broadcastPropertyChange(PropertyChangeEvent event) {
+ for (Iterator it = propertyChangeListeners.iterator(); it.hasNext();) {
+ IPropertyChangeListener listener = (IPropertyChangeListener)it.next();
+ listener.propertyChange(event);
+ }
+ }
+
+ /**
+ * Run an operation involving the given resource. If an exception is thrown
+ * and the code on the status is IResourceStatus.OUT_OF_SYNC_LOCAL then
+ * the user will be prompted to refresh and try again. If they agree, then the
+ * supplied operation will be run again.
+ */
+ public static void runWithRefresh(Shell parent, IResource[] resources,
+ IRunnableWithProgress runnable, IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ boolean firstTime = true;
+ while(true) {
+ try {
+ runnable.run(monitor);
+ return;
+ } catch (InvocationTargetException e) {
+ if (! firstTime) throw e;
+ IStatus status = null;
+ if (e.getTargetException() instanceof CoreException) {
+ status = ((CoreException)e.getTargetException()).getStatus();
+ } else if (e.getTargetException() instanceof TeamException) {
+ status = ((TeamException)e.getTargetException()).getStatus();
+ } else {
+ throw e;
+ }
+ if (status.getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
+ if (promptToRefresh(parent, resources, status)) {
+ try {
+ for (int i = 0; i < resources.length; i++) {
+ resources[i].refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+ } catch (CoreException coreEx) {
+ // Throw the original exception to the caller
+ log(coreEx);
+ throw e;
+ }
+ firstTime = false;
+ // Fall through and the operation will be tried again
+ } else {
+ // User chose not to continue. Treat it as a cancel.
+ throw new InterruptedException();
+ }
+ } else {
+ throw e;
+ }
+ }
+ }
+ }
+
+ private static boolean promptToRefresh(final Shell shell, final IResource[] resources, final IStatus status) {
+ final boolean[] result = new boolean[] { false};
+ Runnable runnable = new Runnable() {
+ public void run() {
+ Shell shellToUse = shell;
+ if (shell == null) {
+ shellToUse = new Shell(Display.getCurrent());
+ }
+ String question;
+ if (resources.length == 1) {
+ question = NLS.bind(CVSUIMessages.CVSUIPlugin_refreshQuestion, new String[] { status.getMessage(), resources[0].getFullPath().toString() });
+ } else {
+ question = NLS.bind(CVSUIMessages.CVSUIPlugin_refreshMultipleQuestion, new String[] { status.getMessage() });
+ }
+ result[0] = MessageDialog.openQuestion(shellToUse, CVSUIMessages.CVSUIPlugin_refreshTitle, question);
+ }
+ };
+ Display.getDefault().syncExec(runnable);
+ return result[0];
+ }
+
+ /**
+ * Creates a busy cursor and runs the specified runnable.
+ * May be called from a non-UI thread.
+ *
+ * @param parent the parent Shell for the dialog
+ * @param cancelable if true, the dialog will support cancelation
+ * @param runnable the runnable
+ *
+ * @exception InvocationTargetException when an exception is thrown from the runnable
+ * @exception InterruptedException when the progress monitor is canceled
+ */
+ public static void runWithProgress(Shell parent, boolean cancelable,
+ final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
+ Utils.runWithProgress(parent, cancelable, runnable);
+ }
+
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ */
+ public ImageDescriptor getImageDescriptor(String id) {
+ return (ImageDescriptor)imageDescriptors.get(id);
+ }
+
+ /**
+ * Returns the singleton plug-in instance.
+ *
+ * @return the plugin instance
+ */
+ public static CVSUIPlugin getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * Returns the repository manager
+ *
+ * @return the repository manager
+ */
+ public synchronized RepositoryManager getRepositoryManager() {
+ if (repositoryManager == null) {
+ repositoryManager = new RepositoryManager();
+ repositoryManager.startup();
+ }
+ return repositoryManager;
+ }
+
+ /**
+ * Initializes the table of images used in this plugin.
+ */
+ private void initializeImages() {
+ // objects
+ createImageDescriptor(ICVSUIConstants.IMG_REPOSITORY);
+ createImageDescriptor(ICVSUIConstants.IMG_REFRESH);
+ createImageDescriptor(ICVSUIConstants.IMG_REFRESH_ENABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_REFRESH_DISABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_LINK_WITH_EDITOR);
+ createImageDescriptor(ICVSUIConstants.IMG_LINK_WITH_EDITOR_ENABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL);
+ createImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL_ENABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION);
+ createImageDescriptor(ICVSUIConstants.IMG_CVSLOGO);
+ createImageDescriptor(ICVSUIConstants.IMG_TAG);
+ createImageDescriptor(ICVSUIConstants.IMG_MODULE);
+ createImageDescriptor(ICVSUIConstants.IMG_CLEAR);
+ createImageDescriptor(ICVSUIConstants.IMG_CLEAR_ENABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_CLEAR_DISABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
+ createImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY);
+ createImageDescriptor(ICVSUIConstants.IMG_DATES_CATEGORY);
+ createImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_SHARE);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_KEYWORD);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION);
+ createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_IMPORT);
+ createImageDescriptor(ICVSUIConstants.IMG_MERGEABLE_CONFLICT);
+ createImageDescriptor(ICVSUIConstants.IMG_QUESTIONABLE);
+ createImageDescriptor(ICVSUIConstants.IMG_MERGED);
+ createImageDescriptor(ICVSUIConstants.IMG_EDITED);
+ createImageDescriptor(ICVSUIConstants.IMG_NO_REMOTEDIR);
+ createImageDescriptor(ICVSUIConstants.IMG_CVS_CONSOLE);
+ createImageDescriptor(ICVSUIConstants.IMG_DATE);
+ createImageDescriptor(ICVSUIConstants.IMG_CHANGELOG);
+ createImageDescriptor(ICVSUIConstants.IMG_FILTER_HISTORY);
+ createImageDescriptor(ICVSUIConstants.IMG_LOCALMODE);
+ createImageDescriptor(ICVSUIConstants.IMG_LOCALREMOTE_MODE);
+ createImageDescriptor(ICVSUIConstants.IMG_REMOTEMODE);
+ createImageDescriptor(ICVSUIConstants.IMG_LOCALMODE_DISABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_LOCALREMOTE_MODE_DISABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_REMOTEMODE_DISABLED);
+ createImageDescriptor(ICVSUIConstants.IMG_LOCALREVISION_TABLE);
+ createImageDescriptor(ICVSUIConstants.IMG_REMOTEREVISION_TABLE);
+ createImageDescriptor(ICVSUIConstants.IMG_COMPARE_VIEW);
+
+ // special
+ createImageDescriptor("glyphs/glyph1.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph2.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph3.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph4.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph5.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph6.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph7.gif"); //$NON-NLS-1$
+ createImageDescriptor("glyphs/glyph8.gif"); //$NON-NLS-1$
+ }
+ /**
+ * Convenience method for logging statuses to the plugin log
+ *
+ * @param status the status to log
+ */
+ public static void log(IStatus status) {
+ getPlugin().getLog().log(status);
+ }
+
+ public static void log(CoreException e) {
+ log(e.getStatus().getSeverity(), CVSUIMessages.simpleInternal, e);
+ }
+
+ /**
+ * Log the given exception along with the provided message and severity indicator
+ */
+ public static void log(int severity, String message, Throwable e) {
+ log(new Status(severity, ID, 0, message, e));
+ }
+
+ // flags to tailor error reporting
+ public static final int PERFORM_SYNC_EXEC = 1;
+ public static final int LOG_TEAM_EXCEPTIONS = 2;
+ public static final int LOG_CORE_EXCEPTIONS = 4;
+ public static final int LOG_OTHER_EXCEPTIONS = 8;
+ public static final int LOG_NONTEAM_EXCEPTIONS = LOG_CORE_EXCEPTIONS | LOG_OTHER_EXCEPTIONS;
+
+ /**
+ * Convenience method for showing an error dialog
+ * @param shell a valid shell or null
+ * @param exception the exception to be report
+ * @param title the title to be displayed
+ * @return IStatus the status that was displayed to the user
+ */
+ public static IStatus openError(Shell shell, String title, String message, Throwable exception) {
+ return openError(shell, title, message, exception, LOG_OTHER_EXCEPTIONS);
+ }
+
+ /**
+ * Convenience method for showing an error dialog
+ * @param shell a valid shell or null
+ * @param exception the exception to be report
+ * @param title the title to be displayed
+ * @param flags customized attributes for the error handling
+ * @return IStatus the status that was displayed to the user
+ */
+ public static IStatus openError(Shell providedShell, String title, String message, Throwable exception, int flags) {
+ // Unwrap InvocationTargetExceptions
+ if (exception instanceof InvocationTargetException) {
+ Throwable target = ((InvocationTargetException)exception).getTargetException();
+ // re-throw any runtime exceptions or errors so they can be handled by the workbench
+ if (target instanceof RuntimeException) {
+ throw (RuntimeException)target;
+ }
+ if (target instanceof Error) {
+ throw (Error)target;
+ }
+ return openError(providedShell, title, message, target, flags);
+ }
+
+ // Determine the status to be displayed (and possibly logged)
+ IStatus status = null;
+ boolean log = false;
+ if (exception instanceof CoreException) {
+ status = ((CoreException)exception).getStatus();
+ log = ((flags & LOG_CORE_EXCEPTIONS) > 0);
+ } else if (exception instanceof TeamException) {
+ status = ((TeamException)exception).getStatus();
+ log = ((flags & LOG_TEAM_EXCEPTIONS) > 0);
+ } else if (exception instanceof InterruptedException) {
+ return new CVSStatus(IStatus.OK, CVSUIMessages.ok);
+ } else if (exception != null) {
+ status = new CVSStatus(IStatus.ERROR, CVSUIMessages.internal, exception);
+ log = ((flags & LOG_OTHER_EXCEPTIONS) > 0);
+ if (title == null) title = CVSUIMessages.internal;
+ }
+
+ // Check for a build error and report it differently
+ if (status.getCode() == IResourceStatus.BUILD_FAILED) {
+ message = CVSUIMessages.buildError;
+ log = true;
+ }
+
+ // Check for multi-status with only one child
+ if (status.isMultiStatus() && status.getChildren().length == 1) {
+ status = status.getChildren()[0];
+ }
+ if (status.isOK()) return status;
+
+ // Log if the user requested it
+ if (log) CVSUIPlugin.log(status.getSeverity(), status.getMessage(), exception);
+
+ // Create a runnable that will display the error status
+ final String displayTitle = title;
+ final String displayMessage = message;
+ final IStatus displayStatus = status;
+ final IOpenableInShell openable = new IOpenableInShell() {
+ public void open(Shell shell) {
+ if (displayStatus.getSeverity() == IStatus.INFO && !displayStatus.isMultiStatus()) {
+ MessageDialog.openInformation(shell, CVSUIMessages.information, displayStatus.getMessage());
+ } else {
+ ErrorDialog.openError(shell, displayTitle, displayMessage, displayStatus);
+ }
+ }
+ };
+ openDialog(providedShell, openable, flags);
+
+ // return the status we display
+ return status;
+ }
+
+ /**
+ * Interface that allows a shell to be passed to an open method. The
+ * provided shell can be used without sync-execing, etc.
+ */
+ public interface IOpenableInShell {
+ public void open(Shell shell);
+ }
+
+ /**
+ * Open the dialog code provided in the IOpenableInShell, ensuring that
+ * the provided shell is valid. This method will provide a shell to the
+ * IOpenableInShell if one is not provided to the method.
+ *
+ * @param providedShell
+ * @param openable
+ * @param flags
+ */
+ public static void openDialog(Shell providedShell, final IOpenableInShell openable, int flags) {
+ // If no shell was provided, try to get one from the active window
+ if (providedShell == null) {
+ IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ providedShell = window.getShell();
+ // sync-exec when we do this just in case
+ flags = flags | PERFORM_SYNC_EXEC;
+ }
+ }
+
+ // Create a runnable that will display the error status
+ final Shell shell = providedShell;
+ Runnable outerRunnable = new Runnable() {
+ public void run() {
+ Shell displayShell;
+ if (shell == null) {
+ Display display = Display.getCurrent();
+ displayShell = new Shell(display);
+ } else {
+ displayShell = shell;
+ }
+ openable.open(displayShell);
+ if (shell == null) {
+ displayShell.dispose();
+ }
+ }
+ };
+
+ // Execute the above runnable as determined by the parameters
+ if (shell == null || (flags & PERFORM_SYNC_EXEC) > 0) {
+ Display display;
+ if (shell == null) {
+ display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ } else {
+ display = shell.getDisplay();
+ }
+ display.syncExec(outerRunnable);
+ } else {
+ outerRunnable.run();
+ }
+ }
+
+
+ /**
+ * Initializes the preferences for this plugin if necessary.
+ */
+ protected void initializeDefaultPluginPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+ // Get the plugin preferences for CVS Core
+ Preferences corePrefs = CVSProviderPlugin.getPlugin().getPluginPreferences();
+
+ store.setDefault(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY, false);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_COMMENTS, true);
+ store.setDefault(ICVSUIConstants.PREF_WRAP_COMMENTS, true);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_TAGS, true);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_SEARCH, false);
+ store.setDefault(ICVSUIConstants.PREF_REVISION_MODE, 0);
+ store.setDefault(ICVSUIConstants.PREF_GROUPBYDATE_MODE, true);
+ store.setDefault(ICVSUIConstants.PREF_HISTORY_VIEW_EDITOR_LINKING, false);
+ store.setDefault(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES, CVSProviderPlugin.DEFAULT_PRUNE);
+ store.setDefault(ICVSUIConstants.PREF_TIMEOUT, CVSProviderPlugin.DEFAULT_TIMEOUT);
+ store.setDefault(ICVSUIConstants.PREF_CONSIDER_CONTENTS, true);
+ store.setDefault(ICVSUIConstants.PREF_COMPRESSION_LEVEL, CVSProviderPlugin.DEFAULT_COMPRESSION_LEVEL);
+ store.setDefault(ICVSUIConstants.PREF_TEXT_KSUBST, CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION.toMode());
+ store.setDefault(ICVSUIConstants.PREF_USE_PLATFORM_LINEEND, true);
+ store.setDefault(ICVSUIConstants.PREF_REPLACE_UNMANAGED, true);
+ store.setDefault(ICVSUIConstants.PREF_CVS_RSH, CVSProviderPlugin.DEFAULT_CVS_RSH);
+ store.setDefault(ICVSUIConstants.PREF_CVS_RSH_PARAMETERS, CVSProviderPlugin.DEFAULT_CVS_RSH_PARAMETERS);
+ store.setDefault(ICVSUIConstants.PREF_CVS_SERVER, CVSProviderPlugin.DEFAULT_CVS_SERVER);
+ store.setDefault(ICVSUIConstants.PREF_EXT_CONNECTION_METHOD_PROXY, "ext"); //$NON-NLS-1$
+ store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_CHANGE_GRANULARITY, true);
+ store.setDefault(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION, true);
+ store.setDefault(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, CVSProviderPlugin.DEFAULT_CONFIRM_MOVE_TAG);
+ store.setDefault(ICVSUIConstants.PREF_DEBUG_PROTOCOL, false);
+ store.setDefault(ICVSUIConstants.PREF_WARN_REMEMBERING_MERGES, true);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG, false);
+ store.setDefault(ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT, false);
+ store.setDefault(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG, false);
+ store.setDefault(ICVSUIConstants.PREF_AUTO_SHARE_ON_IMPORT, true);
+ store.setDefault(ICVSUIConstants.PREF_ENABLE_WATCH_ON_EDIT, false);
+ store.setDefault(ICVSUIConstants.PREF_USE_PROJECT_NAME_ON_CHECKOUT, false);
+ store.setDefault(ICVSUIConstants.PREF_COMMIT_FILES_DISPLAY_THRESHOLD, 1000);
+
+ PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR, new RGB(0, 0, 0));
+ PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR, new RGB(0, 0, 255));
+ PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR, new RGB(255, 0, 0));
+ store.setDefault(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE, false);
+ store.setDefault(ICVSUIConstants.PREF_CONSOLE_LIMIT_OUTPUT, true);
+ store.setDefault(ICVSUIConstants.PREF_CONSOLE_HIGH_WATER_MARK, 500000);
+ store.setDefault(ICVSUIConstants.PREF_CONSOLE_WRAP, false);
+ store.setDefault(ICVSUIConstants.PREF_CONSOLE_WIDTH, 80);
+
+ store.setDefault(ICVSUIConstants.PREF_FILETEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_FILETEXTFORMAT);
+ store.setDefault(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_FOLDERTEXTFORMAT);
+ store.setDefault(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_PROJECTTEXTFORMAT);
+
+ store.setDefault(ICVSUIConstants.PREF_FIRST_STARTUP, true);
+ store.setDefault(ICVSUIConstants.PREF_ADDED_FLAG, CVSDecoratorConfiguration.DEFAULT_ADDED_FLAG);
+ store.setDefault(ICVSUIConstants.PREF_DIRTY_FLAG, CVSDecoratorConfiguration.DEFAULT_DIRTY_FLAG);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, true);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, true);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, false);
+ store.setDefault(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION, true);
+ store.setDefault(ICVSUIConstants.PREF_CALCULATE_DIRTY, true);
+ store.setDefault(ICVSUIConstants.PREF_USE_FONT_DECORATORS, false);
+ store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS, true);
+ store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_SAVING_IN_SYNC, true);
+ store.setDefault(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS, ICVSUIConstants.OPTION_PROMPT);
+
+ store.setDefault(ICVSUIConstants.PREF_DEFAULT_PERSPECTIVE_FOR_SHOW_ANNOTATIONS, CVSPerspective.ID);
+ store.setDefault(ICVSUIConstants.PREF_CHANGE_PERSPECTIVE_ON_SHOW_ANNOTATIONS, MessageDialogWithToggle.PROMPT);
+ store.setDefault(ICVSUIConstants.PREF_USE_QUICKDIFFANNOTATE, MessageDialogWithToggle.PROMPT);
+ store.setDefault(ICVSUIConstants.PREF_ANNOTATE_PROMPTFORBINARY, MessageDialogWithToggle.PROMPT);
+ store.setDefault(ICVSUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS, MessageDialogWithToggle.PROMPT);
+ store.setDefault(ICVSUIConstants.PREF_INCLUDE_CHANGE_SETS_IN_COMMIT, MessageDialogWithToggle.NEVER);
+
+ store.setDefault(ICVSUIConstants.PREF_UPDATE_HANDLING, ICVSUIConstants.PREF_UPDATE_HANDLING_PERFORM);
+ store.setDefault(ICVSUIConstants.PREF_UPDATE_PREVIEW, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_SYNCVIEW);
+
+ store.setDefault(ICVSUIConstants.PREF_ENABLE_MODEL_SYNC, true);
+
+ // Set the watch/edit preferences defaults and values
+ store.setDefault(ICVSUIConstants.PREF_CHECKOUT_READ_ONLY, corePrefs.getDefaultBoolean(CVSProviderPlugin.READ_ONLY));
+ store.setDefault(ICVSUIConstants.PREF_EDIT_ACTION, ICVSUIConstants.PREF_EDIT_IN_BACKGROUND);
+ store.setDefault(ICVSUIConstants.PREF_EDIT_PROMPT, ICVSUIConstants.PREF_EDIT_PROMPT_IF_EDITORS);
+ store.setDefault(ICVSUIConstants.PREF_UPDATE_PROMPT, ICVSUIConstants.PREF_UPDATE_PROMPT_NEVER);
+ // Ensure that the preference values in UI match Core
+ store.setValue(ICVSUIConstants.PREF_CHECKOUT_READ_ONLY, corePrefs.getBoolean(CVSProviderPlugin.READ_ONLY));
+
+ // Forward the values to the CVS plugin
+ CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
+ CVSProviderPlugin.getPlugin().setTimeout(store.getInt(ICVSUIConstants.PREF_TIMEOUT));
+ CVSProviderPlugin.getPlugin().setCvsRshCommand(store.getString(ICVSUIConstants.PREF_CVS_RSH));
+ CVSProviderPlugin.getPlugin().setCvsRshParameters(store.getString(ICVSUIConstants.PREF_CVS_RSH_PARAMETERS));
+ CVSProviderPlugin.getPlugin().setCvsServer(store.getString(ICVSUIConstants.PREF_CVS_SERVER));
+ CVSRepositoryLocation.setExtConnectionMethodProxy(store.getString(ICVSUIConstants.PREF_EXT_CONNECTION_METHOD_PROXY));
+ CVSProviderPlugin.getPlugin().setQuietness(CVSPreferencesPage.getQuietnessOptionFor(store.getInt(ICVSUIConstants.PREF_QUIETNESS)));
+ CVSProviderPlugin.getPlugin().setCompressionLevel(store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
+ CVSProviderPlugin.getPlugin().setReplaceUnmanaged(store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
+ CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(KSubstOption.fromMode(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST)));
+ CVSProviderPlugin.getPlugin().setUsePlatformLineend(store.getBoolean(ICVSUIConstants.PREF_USE_PLATFORM_LINEEND));
+ CVSProviderPlugin.getPlugin().setRepositoriesAreBinary(store.getBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY));
+ CVSProviderPlugin.getPlugin().setDetermineVersionEnabled(store.getBoolean(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION));
+ CVSProviderPlugin.getPlugin().setDebugProtocol(CVSProviderPlugin.getPlugin().isDebugProtocol() || store.getBoolean(ICVSUIConstants.PREF_DEBUG_PROTOCOL));
+ CVSProviderPlugin.getPlugin().setAutoshareOnImport(store.getBoolean(ICVSUIConstants.PREF_AUTO_SHARE_ON_IMPORT));
+
+ // proxy configuration
+ store.setDefault(ICVSUIConstants.PREF_USE_PROXY, false);
+ store.setDefault(ICVSUIConstants.PREF_PROXY_TYPE, CVSProviderPlugin.PROXY_TYPE_HTTP);
+ store.setDefault(ICVSUIConstants.PREF_PROXY_HOST, ""); //$NON-NLS-1$
+ store.setDefault(ICVSUIConstants.PREF_PROXY_PORT, CVSProviderPlugin.HTTP_DEFAULT_PORT);
+ store.setDefault(ICVSUIConstants.PREF_PROXY_AUTH, false);
+
+ CVSProviderPlugin.getPlugin().setUseProxy(store.getBoolean(ICVSUIConstants.PREF_USE_PROXY));
+ CVSProviderPlugin.getPlugin().setProxyType(store.getString(ICVSUIConstants.PREF_PROXY_TYPE));
+ CVSProviderPlugin.getPlugin().setProxyHost(store.getString(ICVSUIConstants.PREF_PROXY_HOST));
+ CVSProviderPlugin.getPlugin().setProxyPort(store.getString(ICVSUIConstants.PREF_PROXY_PORT));
+ CVSProviderPlugin.getPlugin().setUseProxyAuth(store.getBoolean(ICVSUIConstants.PREF_PROXY_AUTH));
+
+ // code to transfer CVS preference to Team preference
+ if (store.getBoolean(ICVSUIConstants.PREF_SHOW_AUTHOR_IN_EDITOR)) {
+ store.setValue(ICVSUIConstants.PREF_SHOW_AUTHOR_IN_EDITOR, false);
+ IPreferenceStore teamStore = TeamUIPlugin.getPlugin().getPreferenceStore();
+ if (teamStore.isDefault(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR))
+ teamStore.setValue(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR, true);
+ }
+ }
+
+ /**
+ * @see Plugin#start(BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ initializeImages();
+
+ CVSAdapterFactory factory = new CVSAdapterFactory();
+ Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFile.class);
+ Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFolder.class);
+ Platform.getAdapterManager().registerAdapters(factory, ICVSRepositoryLocation.class);
+ Platform.getAdapterManager().registerAdapters(factory, RepositoryRoot.class);
+
+ try {
+ console = new CVSOutputConsole();
+ } catch (RuntimeException e) {
+ // Don't let the console bring down the CVS UI
+ log(IStatus.ERROR, "Errors occurred starting the CVS console", e); //$NON-NLS-1$
+ }
+
+ IPreferenceStore store = getPreferenceStore();
+ if (store.getBoolean(ICVSUIConstants.PREF_FIRST_STARTUP)) {
+ // If we enable the decorator in the XML, the CVS plugin will be loaded
+ // on startup even if the user never uses CVS. Therefore, we enable the
+ // decorator on the first start of the CVS plugin since this indicates that
+ // the user has done something with CVS. Subsequent startups will load
+ // the CVS plugin unless the user disables the decorator. In this case,
+ // we will not re-enable since we only enable automatically on the first startup.
+ PlatformUI.getWorkbench().getDecoratorManager().setEnabled(CVSLightweightDecorator.ID, true);
+ store.setValue(ICVSUIConstants.PREF_FIRST_STARTUP, false);
+ }
+
+ }
+
+ /**
+ * @see Plugin#stop(BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ try {
+ try {
+ if (repositoryManager != null)
+ repositoryManager.shutdown();
+ } catch (TeamException e) {
+ throw new CoreException(e.getStatus());
+ }
+
+ if (console != null)
+ console.shutdown();
+ } finally {
+ super.stop(context);
+ }
+ }
+
+ /**
+ * @return the CVS console
+ */
+ public CVSOutputConsole getConsole() {
+ return console;
+ }
+
+ public void openEditor(ICVSRemoteFile file, IProgressMonitor monitor) throws InvocationTargetException {
+ IWorkbench workbench = getWorkbench();
+ IEditorRegistry registry = workbench.getEditorRegistry();
+ IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ String filename = file.getName();
+ InputStream contents = null;
+ try {
+ contents = file.getContents(monitor);
+ } catch (TeamException e) {
+ CVSUIPlugin.log(new CVSStatus(IStatus.ERROR, NLS.bind("An error occurred fetching the contents of file {0}", new String[] { file.getRepositoryRelativePath()}, e))); //$NON-NLS-1$
+
+ }
+ IContentType type = null;
+ if (contents != null) {
+ try {
+ type = Platform.getContentTypeManager().findContentTypeFor(contents, filename);
+ } catch (IOException e) {
+ CVSUIPlugin.log(new CVSStatus(IStatus.ERROR, NLS.bind("An error occurred reading the contents of file {0}", new String[] { file.getRepositoryRelativePath()}, e))); //$NON-NLS-1$
+ }
+ }
+ if (type == null) {
+ type = Platform.getContentTypeManager().findContentTypeFor(filename);
+ }
+ IEditorDescriptor descriptor = registry.getDefaultEditor(filename, type);
+ String id;
+ if (descriptor == null) {
+ id = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
+ } else {
+ id = descriptor.getId();
+ }
+ try {
+ try {
+ page.openEditor(new RemoteFileEditorInput(file, monitor), id);
+ } catch (PartInitException e) {
+ if (id.equals("org.eclipse.ui.DefaultTextEditor")) { //$NON-NLS-1$
+ throw e;
+ } else {
+ page.openEditor(new RemoteFileEditorInput(file, monitor), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
+ }
+ }
+ } catch (PartInitException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+
+ /**
+ * Helper method which access the preference store to determine if the
+ * project name from the project description file (.project) should be used
+ * as the project name on checkout.
+ */
+ public boolean isUseProjectNameOnCheckout() {
+ return getPreferenceStore().getBoolean(ICVSUIConstants.PREF_USE_PROJECT_NAME_ON_CHECKOUT);
+ }
+
+ public ActiveChangeSetManager getChangeSetManager() {
+ return CVSProviderPlugin.getPlugin().getChangeSetManager();
+ }
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
new file mode 100644
index 000000000..a67dbd2d3
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Philippe Ombredanne - bug 84808
+ *******************************************************************************/
+
+package org.eclipse.team.internal.ccvs.ui;
+
+public interface ICVSUIConstants {
+ public final String PREFIX = CVSUIPlugin.ID + "."; //$NON-NLS-1$
+
+ // image path
+ public final String ICON_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
+
+ // images
+ public final String IMG_CVS_CONSOLE = "eview16/console_view.gif"; //$NON-NLS-1$
+ public final String IMG_CVS_PERSPECTIVE = "eview16/cvs_persp.gif"; //$NON-NLS-1$
+ public final String IMG_COMPARE_VIEW = "eview16/compare_view.gif"; //$NON-NLS-1$
+
+ // overlays
+ public final String IMG_MERGEABLE_CONFLICT = "ovr16/confauto_ov.gif"; //$NON-NLS-1$
+ public final String IMG_QUESTIONABLE = "ovr16/question_ov.gif"; //$NON-NLS-1$
+ public final String IMG_MERGED = "ovr16/merged_ov.gif"; //$NON-NLS-1$
+ public final String IMG_EDITED = "ovr16/edited_ov.gif"; //$NON-NLS-1$
+ public final String IMG_NO_REMOTEDIR = "ovr16/no_remotedir_ov.gif"; //$NON-NLS-1$
+
+ // objects
+ public final String IMG_REPOSITORY = "obj16/repository_rep.gif"; //$NON-NLS-1$
+ public final String IMG_TAG = "obj16/tag.gif"; //$NON-NLS-1$
+ public final String IMG_BRANCHES_CATEGORY = "obj16/branches_rep.gif"; //$NON-NLS-1$
+ public final String IMG_VERSIONS_CATEGORY = "obj16/versions_rep.gif"; //$NON-NLS-1$
+ public final String IMG_DATES_CATEGORY = "obj16/dates.gif"; //$NON-NLS-1$
+
+ public final String IMG_MODULE = "obj16/module_rep.gif"; //$NON-NLS-1$
+ public final String IMG_PROJECT_VERSION = "obj16/prjversions_rep.gif"; //$NON-NLS-1$
+ public final String IMG_DATE = "obj16/date.gif"; //$NON-NLS-1$
+ public final String IMG_CHANGELOG = "obj16/changelog_obj.gif"; //$NON-NLS-1$
+
+ public final String IMG_LOCALREVISION_TABLE = "obj16/local_entry_tbl.gif"; //$NON-NLS-1$
+ public final String IMG_REMOTEREVISION_TABLE = "obj16/remote_entry_tbl.gif"; //$NON-NLS-1$
+
+ // toolbar
+ public final String IMG_REFRESH = "elcl16/refresh.gif"; //$NON-NLS-1$
+ public final String IMG_CLEAR = "elcl16/clear_co.gif"; //$NON-NLS-1$
+ public final String IMG_COLLAPSE_ALL = "elcl16/collapseall.gif"; //$NON-NLS-1$
+ public final String IMG_LINK_WITH_EDITOR = "elcl16/synced.gif"; //$NON-NLS-1$
+ public final String IMG_REMOVE_CONSOLE = "elcl16/console_rem.gif"; //$NON-NLS-1$
+ public final String IMG_REMOTEMODE = "elcl16/remote_history_mode.gif"; //$NON-NLS-1$
+ public final String IMG_LOCALMODE = "elcl16/local_history_mode.gif"; //$NON-NLS-1$
+ public final String IMG_LOCALREMOTE_MODE = "elcl16/all_history_mode.gif"; //$NON-NLS-1$
+
+ // toolbar (disabled)
+ public final String IMG_REFRESH_DISABLED = "dlcl16/refresh.gif"; //$NON-NLS-1$
+ public final String IMG_CLEAR_DISABLED = "dlcl16/clear_co.gif"; //$NON-NLS-1$
+ public final String IMG_REMOVE_CONSOLE_DISABLED = "dlcl16/console_rem.gif"; //$NON-NLS-1$
+ public final String IMG_REMOTEMODE_DISABLED = "dlcl16/remote_history_mode.gif"; //$NON-NLS-1$
+ public final String IMG_LOCALMODE_DISABLED = "dlcl16/local_history_mode.gif"; //$NON-NLS-1$
+ public final String IMG_LOCALREMOTE_MODE_DISABLED = "dlcl16/all_history_mode.gif"; //$NON-NLS-1$
+
+ // toolbar (enabled)
+ public final String IMG_REFRESH_ENABLED = "elcl16/refresh.gif"; //$NON-NLS-1$
+ public final String IMG_CLEAR_ENABLED = "elcl16/clear_co.gif"; //$NON-NLS-1$
+ public final String IMG_COLLAPSE_ALL_ENABLED = "elcl16/collapseall.gif"; //$NON-NLS-1$
+ public final String IMG_LINK_WITH_EDITOR_ENABLED = "elcl16/synced.gif"; //$NON-NLS-1$
+
+ //history page toolbar
+ public final String IMG_FILTER_HISTORY = "elcl16/filter_history.gif"; //$NON-NLS-1$
+
+ // wizards
+ public final String IMG_NEWLOCATION = "etool16/newlocation_wiz.gif"; //$NON-NLS-1$
+ public final String IMG_CVSLOGO = "etool16/newconnect_wiz.gif"; //$NON-NLS-1$
+
+ // preferences
+ public final String PREF_REVISION_MODE = "pref_revision_mode"; //$NON-NLS-1$
+ public final String PREF_GROUPBYDATE_MODE = "pref_groupbydate_mode"; //$NON-NLS-1$
+ public final String PREF_SHOW_COMMENTS = "pref_show_comments"; //$NON-NLS-1$
+ public final String PREF_WRAP_COMMENTS = "pref_wrap_comments"; //$NON-NLS-1$
+ public final String PREF_SHOW_TAGS = "pref_show_tags"; //$NON-NLS-1$
+ public final String PREF_SHOW_SEARCH = "pref_show_search"; //$NON-NLS-1$
+ public final String PREF_HISTORY_VIEW_EDITOR_LINKING = "pref_history_view_linking"; //$NON-NLS-1$
+ public final String PREF_PRUNE_EMPTY_DIRECTORIES = "pref_prune_empty_directories"; //$NON-NLS-1$
+ public final String PREF_TIMEOUT = "pref_timeout"; //$NON-NLS-1$
+ public final String PREF_QUIETNESS = "pref_quietness"; //$NON-NLS-1$
+ public final String PREF_CVS_RSH = "pref_cvs_rsh"; //$NON-NLS-1$
+ public final String PREF_CVS_RSH_PARAMETERS = "pref_cvs_rsh_parameters"; //$NON-NLS-1$
+ public final String PREF_CVS_SERVER = "pref_cvs_server"; //$NON-NLS-1$
+ public final String PREF_CONSIDER_CONTENTS = "pref_consider_contents"; //$NON-NLS-1$
+ public final String PREF_REPLACE_UNMANAGED = "pref_replace_unmanaged"; //$NON-NLS-1$
+ public final String PREF_COMPRESSION_LEVEL = "pref_compression_level"; //$NON-NLS-1$
+ public final String PREF_TEXT_KSUBST = "pref_text_ksubst"; //$NON-NLS-1$
+ public final String PREF_USE_PLATFORM_LINEEND = "pref_lineend"; //$NON-NLS-1$
+ public final String PREF_PROMPT_ON_MIXED_TAGS = "pref_prompt_on_mixed_tags"; //$NON-NLS-1$
+ public final String PREF_PROMPT_ON_SAVING_IN_SYNC = "pref_prompt_on_saving_in_sync"; //$NON-NLS-1$
+ public final String PREF_SAVE_DIRTY_EDITORS = "pref_save_dirty_editors"; //$NON-NLS-1$
+ public final String PREF_PROMPT_ON_CHANGE_GRANULARITY = "pref_prompt_on_change_granularity"; //$NON-NLS-1$
+ public final String PREF_REPOSITORIES_ARE_BINARY = "pref_repositories_are_binary"; //$NON-NLS-1$
+ public final String PREF_DETERMINE_SERVER_VERSION = "pref_determine_server_version"; //$NON-NLS-1$
+ public final String PREF_CONFIRM_MOVE_TAG = "pref_confirm_move_tag"; //$NON-NLS-1$
+ public final String PREF_DEBUG_PROTOCOL = "pref_debug_protocol"; //$NON-NLS-1$
+ public final String PREF_WARN_REMEMBERING_MERGES = "pref_remember_merges"; //$NON-NLS-1$
+ public final String PREF_FIRST_STARTUP = "pref_first_startup"; //$NON-NLS-1$
+ public final String PREF_EXT_CONNECTION_METHOD_PROXY = "pref_ext_connection_method_proxy"; //$NON-NLS-1$
+ public final String PREF_SHOW_COMPARE_REVISION_IN_DIALOG = "pref_show_compare_revision_in_dialog"; //$NON-NLS-1$
+ public final String PREF_SHOW_AUTHOR_IN_EDITOR = "pref_show_author_in_editor"; //$NON-NLS-1$
+ public final String PREF_COMMIT_SET_DEFAULT_ENABLEMENT = "pref_enable_commit_sets"; //$NON-NLS-1$
+ public final String PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG = "pref_auto_refresh_tags_in_tag_selection_dialog"; //$NON-NLS-1$
+ public final String PREF_COMMIT_FILES_DISPLAY_THRESHOLD = "pref_commit_files_display_threshold"; //$NON-NLS-1$
+ public final String PREF_AUTO_SHARE_ON_IMPORT = "pref_auto_share_on_import"; //$NON-NLS-1$
+ public final String PREF_ENABLE_WATCH_ON_EDIT = "pref_enable_watch_on_edit"; //$NON-NLS-1$
+ public final String PREF_USE_PROJECT_NAME_ON_CHECKOUT = "pref_use_project_name_on_checkout"; //$NON-NLS-1$
+ public final String PREF_USE_QUICKDIFFANNOTATE = "pref_use_quickdiffannotate"; //$NON-NLS-1$
+ public final String PREF_INCLUDE_CHANGE_SETS_IN_COMMIT = "pref_include_change_sets"; //$NON-NLS-1$
+ public final String PREF_ANNOTATE_PROMPTFORBINARY = "pref_annotate_promptforbinary"; //$NON-NLS-1$
+
+ // console preferences
+ public final String PREF_CONSOLE_COMMAND_COLOR = "pref_console_command_color"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_MESSAGE_COLOR = "pref_console_message_color"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_ERROR_COLOR = "pref_console_error_color"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_FONT = "pref_console_font"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_SHOW_ON_MESSAGE = "pref_console_show_on_message"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_LIMIT_OUTPUT = "pref_console_limit_output"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_HIGH_WATER_MARK = "pref_console_high_water_mark"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_WRAP = "pref_console_wrap"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_WIDTH = "pref_console_width"; //$NON-NLS-1$
+
+ // decorator preferences
+ public final String PREF_FILETEXT_DECORATION = "pref_filetext_decoration"; //$NON-NLS-1$
+ public final String PREF_FOLDERTEXT_DECORATION = "pref_foldertext_decoration"; //$NON-NLS-1$
+ public final String PREF_PROJECTTEXT_DECORATION = "pref_projecttext_decoration"; //$NON-NLS-1$
+
+ public final String PREF_SHOW_DIRTY_DECORATION = "pref_show_overlaydirty"; //$NON-NLS-1$
+ public final String PREF_SHOW_ADDED_DECORATION = "pref_show_added"; //$NON-NLS-1$
+ public final String PREF_SHOW_HASREMOTE_DECORATION = "pref_show_hasremote"; //$NON-NLS-1$
+ public final String PREF_SHOW_NEWRESOURCE_DECORATION = "pref_show_newresource"; //$NON-NLS-1$
+
+ public final String PREF_DIRTY_FLAG = "pref_dirty_flag"; //$NON-NLS-1$
+ public final String PREF_ADDED_FLAG = "pref_added_flag"; //$NON-NLS-1$
+
+ public final String PREF_CALCULATE_DIRTY = "pref_calculate_dirty"; //$NON-NLS-1$
+ public final String PREF_USE_FONT_DECORATORS= "pref_use_font_decorators"; //$NON-NLS-1$
+
+ // watch/edit preferences
+ public final String PREF_CHECKOUT_READ_ONLY = "pref_checkout_read_only"; //$NON-NLS-1$
+ public final String PREF_EDIT_ACTION = "pref_edit_action"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT_EDIT = "edit"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT_HIGHJACK = "highjack"; //$NON-NLS-1$
+ public final String PREF_EDIT_IN_BACKGROUND = "editInBackground"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT = "pref_edit_prompt"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT_NEVER = "never"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT_ALWAYS = "always"; //$NON-NLS-1$
+ public final String PREF_EDIT_PROMPT_IF_EDITORS = "only"; //$NON-NLS-1$
+
+ // update preferences
+ public final String PREF_UPDATE_PROMPT = "pref_update_prompt"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PROMPT_NEVER = "never"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PROMPT_AUTO = "auto"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PROMPT_IF_OUTDATED = "only"; //$NON-NLS-1$
+
+ // Repositories view preferences
+ public final String PREF_GROUP_VERSIONS_BY_PROJECT = "pref_group_versions_by_project"; //$NON-NLS-1$
+
+ // Perspective changing preferences
+ public final String PREF_CHANGE_PERSPECTIVE_ON_NEW_REPOSITORY_LOCATION = "pref_change_perspective_on_new_location"; //$NON-NLS-1$
+ public final String PREF_CHANGE_PERSPECTIVE_ON_SHOW_ANNOTATIONS= "pref_change_perspective_on_show_annotations"; //$NON-NLS-1$
+ public final String PREF_DEFAULT_PERSPECTIVE_FOR_SHOW_ANNOTATIONS= "pref_default_perspective_for_show_annotations"; //$NON-NLS-1$
+
+ public final String PREF_ALLOW_EMPTY_COMMIT_COMMENTS= "pref_allow_empty_commit_comment"; //$NON-NLS-1$
+
+ public final String PREF_UPDATE_HANDLING = "pref_team_update_handling"; //$NON-NLS-1$
+ public final String PREF_UPDATE_HANDLING_PREVIEW = "previewUpdate"; //$NON-NLS-1$
+ public final String PREF_UPDATE_HANDLING_PERFORM = "performUpdate"; //$NON-NLS-1$
+ public final String PREF_UPDATE_HANDLING_TRADITIONAL = "traditionalUpdate"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PREVIEW = "pref_update_preview"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PREVIEW_IN_DIALOG = "dialog"; //$NON-NLS-1$
+ public final String PREF_UPDATE_PREVIEW_IN_SYNCVIEW = "syncView"; //$NON-NLS-1$
+
+ public final String PREF_ENABLE_MODEL_SYNC = "enableModelSync"; //$NON-NLS-1$
+
+ public final String PREF_USE_PROXY = "proxyEnabled"; //$NON-NLS-1$
+ public final String PREF_PROXY_TYPE = "proxyType"; //$NON-NLS-1$
+ public final String PREF_PROXY_HOST = "proxyHost"; //$NON-NLS-1$
+ public final String PREF_PROXY_PORT = "proxyPort"; //$NON-NLS-1$
+ public final String PREF_PROXY_AUTH = "proxyAuth"; //$NON-NLS-1$
+
+ // Wizard banners
+ public final String IMG_WIZBAN_SHARE = "wizban/newconnect_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_MERGE = "wizban/mergestream_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_DIFF = "wizban/createpatch_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_KEYWORD = "wizban/keywordsub_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_NEW_LOCATION = "wizban/newlocation_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_CHECKOUT = "wizban/newconnect_wizban.png"; //$NON-NLS-1$
+ public final String IMG_WIZBAN_IMPORT = "wizban/import_wiz.png"; //$NON-NLS-1$
+
+ // Properties
+ public final String PROP_NAME = "cvs.name"; //$NON-NLS-1$
+ public final String PROP_REVISION = "cvs.revision"; //$NON-NLS-1$
+ public final String PROP_AUTHOR = "cvs.author"; //$NON-NLS-1$
+ public final String PROP_COMMENT = "cvs.comment"; //$NON-NLS-1$
+ public final String PROP_DATE = "cvs.date"; //$NON-NLS-1$
+ public final String PROP_DIRTY = "cvs.dirty"; //$NON-NLS-1$
+ public final String PROP_MODIFIED = "cvs.modified"; //$NON-NLS-1$
+ public final String PROP_KEYWORD = "cvs.date"; //$NON-NLS-1$
+ public final String PROP_TAG = "cvs.tag"; //$NON-NLS-1$
+ public final String PROP_PERMISSIONS = "cvs.permissions"; //$NON-NLS-1$
+ public final String PROP_HOST = "cvs.host"; //$NON-NLS-1$
+ public final String PROP_USER = "cvs.user"; //$NON-NLS-1$
+ public final String PROP_METHOD = "cvs.method"; //$NON-NLS-1$
+ public final String PROP_PORT = "cvs.port"; //$NON-NLS-1$
+ public final String PROP_ROOT = "cvs.root"; //$NON-NLS-1$
+
+ // preference options
+ public final int OPTION_NEVER = 1;
+ public final int OPTION_PROMPT = 2;
+ public final int OPTION_AUTOMATIC = 3;
+
+ public final String OPTION_NO_PERSPECTIVE= "none"; //$NON-NLS-1$
+
+ // Command Ids
+ public final String CMD_COMMIT = "org.eclipse.team.cvs.ui.commit"; //$NON-NLS-1$
+ public final String CMD_SYNCHRONIZE = "org.eclipse.team.ui.synchronizeLast"; //$NON-NLS-1$
+ public final String CMD_UPDATE = "org.eclipse.team.cvs.ui.update"; //$NON-NLS-1$
+ public final String CMD_CREATEPATCH = "org.eclipse.team.cvs.ui.GenerateDiff"; //$NON-NLS-1$
+ public final String CMD_TAGASVERSION = "org.eclipse.team.cvs.ui.tag"; //$NON-NLS-1$
+ public final String CMD_BRANCH = "org.eclipse.team.cvs.ui.branch"; //$NON-NLS-1$
+ public final String CMD_MERGE = "org.eclipse.team.cvs.ui.merge"; //$NON-NLS-1$
+ public final String CMD_UPDATESWITCH = "org.eclipse.team.cvs.ui.updateSwitch"; //$NON-NLS-1$
+ public final String CMD_SETFILETYPE = "org.eclipse.team.cvs.ui.setKeywordSubstitution"; //$NON-NLS-1$
+ public final String CMD_ANNOTATE = "org.eclipse.team.cvs.ui.showAnnotation"; //$NON-NLS-1$
+ public final String CMD_HISTORY = "org.eclipse.team.cvs.ui.showHistory"; //$NON-NLS-1$
+ public final String CMD_ADD = "org.eclipse.team.cvs.ui.add"; //$NON-NLS-1$
+ public final String CMD_IGNORE = "org.eclipse.team.cvs.ui.ignore"; //$NON-NLS-1$
+
+}
+
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
new file mode 100644
index 000000000..41c6eb7b9
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -0,0 +1,1147 @@
+###############################################################################
+# Copyright (c) 2000, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Maik Schreiber - bug 102461
+# Philippe Ombredanne - bug 84808
+###############################################################################
+PasswordManagementPreferencePage_2=When you create a CVS repository location you have the option of saving the password to disk. This page allows you to manage the stored passwords. The following CVS repository locations have saved passwords:
+PasswordManagementPreferencePage_3=Location
+PasswordManagementPreferencePage_4=Username
+PasswordManagementPreferencePage_5=&Remove
+PasswordManagementPreferencePage_6=Remove A&ll
+UserValidationDialog_5=CVS Repository:
+UserValidationDialog_6=&Save password
+UserValidationDialog_7=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
+simpleInternal=Internal error
+internal=An internal error has occurred, consult the error log for details.
+yes=Yes
+no=No
+information=Server Information
+cvs=CVS
+notAvailable=Not Available
+buildError=A build error occurred after the CVS operation completed.
+ok=OK
+separator=/
+
+nameAndRevision={0} {1}
+currentRevision=*{0}
+
+AddAction_addFailed=Error occurred during Add
+AddAction_adding=Adding...
+AddAction_addIgnoredTitle=Add Ignored Resource?
+AddAction_addIgnoredQuestion=You have explicitly asked to version control one or more resources that otherwise would have been ignored. Continue?
+
+AddToVersionControlDialog_title=Add to CVS Version Control
+AddToVersionControlDialog_thereIsAnUnaddedResource=There is {0} resource that is not under CVS version control. Do you want to add it?
+AddToVersionControlDialog_thereAreUnaddedResources=There are {0} resources that are not under CVS version control. Do you want to add them?
+
+
+
+AvoidableMessageDialog_dontShowAgain=Don't show this again
+
+BranchWizard_title=Create a new CVS Branch
+BranchWizardPage_pageDescription=Creates a new branch and a starting point version.
+BranchWizardPage_pageDescriptionVersion=Creates a new branch based on the version in the workspace.
+BranchWizardPage_specifyVersion=The version will provide a starting point for merging the branch back to the source branch.
+BranchWizardPage_branchName=&Branch Name:
+BranchWizardPage_versionName=&Version Name:
+BranchWizardPage_startWorking=Start &working in the branch
+BranchWizardPage_versionPrefix=Root_
+BranchWizard_versionNameWarning=Version name: {0}
+BranchWizard_branchNameWarning=Branch name: {0}
+BranchWizard_branchAndVersionMustBeDifferent=The branch name and version name must be different.
+BranchWizardPage_existingVersionsAndBranches=E&xisting Versions and Branches
+
+ConsolePreferencePage_consoleColorSettings=Console text color settings:
+ConsolePreferencePage_commandColor=&Command Line:
+ConsolePreferencePage_messageColor=&Message:
+ConsolePreferencePage_errorColor=E&rror:
+
+CVSAction_errorTitle=Errors occurred
+CVSAction_warningTitle=Warnings occurred
+CVSAction_multipleProblemsMessage=Multiple problems occurred:
+CVSAction_mixingTagsTitle=Confirm Mixing Tags
+CVSAction_mixingTags=You are mixing tags within a project. Beware that synchronization uses the tag information associated with each resource to determine the remote resource with which the local resource is compared. \n\nThis means that the part(s) of your project that you are replacing with another tag will be synchronized with the tag ''{0}'' while other resources in the project will be synchronized with another tag. \n\nDo you wish to continue?
+CVSAction_handlerNotEnabledTitle=Warning
+CVSAction_handlerNotEnabledMessage=The action doesn't apply to the current selection.
+
+CVSAnnotateView_showFileAnnotation=CVS Annotate - {0}
+CVSAnnotateView_viewInstructions=This view shows annotations for a file in CVS. Select a file and then choose \"Team->Show Annotation\" from the context menu.
+
+ShowAnnotationAction_noSyncInfo=Cannot display annotation for {0} because it does not have a remote revision.
+ShowAnnotationOperation_taskName=Fetching annotations from repository
+ShowAnnotationOperation_QDAnnotateTitle=Quick Diff Annotate
+ShowAnnotationOperation_QDAnnotateMessage=Do you wish to view annotations using quick diff?
+ShowAnnotationOperation_0=Error opening perspective
+ShowAnnotationOperation_1=Confirm Open Perspective
+ShowAnnotationOperation_2=The CVS Annotate View is associated with the {0} perspective. Do you want to open that perspective now?
+ShowAnnotationOperation_3=The CVS Annotate View is associated with the {0} perspective.\n\n{1}\n\nDo you want to open that perspective now?
+ShowAnnotationOperation_4=&Remember my decision
+NewLocationWizard_1=Confirm Open Perspective
+NewLocationWizard_2=CVS Repositories are associated with the {0} perspective. Do you want to open that perspective now?
+NewLocationWizard_3=CVS Repositories are associated with the {0} perspective.\n\n{1}\n\nDo you want to open that perspective now?
+NewLocationWizard_4=&Remember my decision
+
+
+CVSCompareEditorInput_branchLabel=<branch-{0}>
+CVSCompareEditorInput_headLabel=<HEAD>
+CVSCompareEditorInput_comparing=Comparing...
+CVSCompareEditorInput_different=Cannot compare resources of different kind.
+CVSCompareEditorInput_inBranch={0} in {1}
+CVSCompareEditorInput_inHead={0} in HEAD
+CVSCompareEditorInput_0=File is new
+CVSCompareEditorInput_1=File has been deleted
+CVSCompareEditorInput_repository=Repository: {0} {1}
+CVSCompareEditorInput_titleAncestor=Compare {0} {1}-{2} and {3}
+CVSCompareEditorInput_titleNoAncestor=Compare {0} {1} and {2}
+CVSCompareEditorInput_titleNoAncestorDifferent=Compare {0} {1} and {2} {3}
+
+CVSCompareRevisionsInput_compareResourceAndVersions=Revisions of ''{0}''
+CVSCompareRevisionsInput_repository=Repository file: {0}
+CVSCompareRevisionsInput_workspace=Workspace file: {0}
+CVSCompareRevisionsInput_truncate={0}[...]
+
+CVSDecoratorPreferencesPage_0=Select the &variables to add to the decoration format:
+CVSDecoratorPreferencesPage_1=Add Variables
+CVSDecoratorPreferencesPage_2=O&utgoing changes
+CVSDecoratorPreferencesPage_3=Re&mote resources
+CVSDecoratorPreferencesPage_4=Added &resources
+CVSDecoratorPreferencesPage_5=&New resources
+CVSDecoratorPreferencesPage_6=I&con Decorations
+CVSDecoratorPreferencesPage_7=File &Decoration:
+CVSDecoratorPreferencesPage_8=Add &Variables...
+CVSDecoratorPreferencesPage_9=F&older Decoration:
+CVSDecoratorPreferencesPage_10=Add Varia&bles...
+CVSDecoratorPreferencesPage_11=&Project Decoration:
+CVSDecoratorPreferencesPage_12=Add Variable&s...
+CVSDecoratorPreferencesPage_13=Di&rty flag:
+CVSDecoratorPreferencesPage_14=Added f&lag:
+CVSDecoratorPreferencesPage_15=Te&xt Decorations
+CVSDecoratorPreferencesPage_16=C&ompute deep outgoing state for folders
+CVSDecoratorPreferencesPage_17=Disabling this will improve decorator performance.
+CVSDecoratorPreferencesPage_18=Enable &font and color decorations
+CVSDecoratorPreferencesPage_19=org.eclipse.ui.preferencePages.ColorsAndFonts
+CVSDecoratorPreferencesPage_20=See <a>''{0}''</a> to configure the font and color decorations.
+CVSDecoratorPreferencesPage_21=&General
+CVSDecoratorPreferencesPage_22=name of the resource being decorated
+CVSDecoratorPreferencesPage_23=the tag applied to the resource
+CVSDecoratorPreferencesPage_24=keyword substitution rule for the resource
+CVSDecoratorPreferencesPage_25=last revision loaded into workspace
+CVSDecoratorPreferencesPage_26=flag indicating that the file has outgoing changes
+CVSDecoratorPreferencesPage_27=flag indicating that the file has been added to the server
+CVSDecoratorPreferencesPage_28=name of the resource being decorated
+CVSDecoratorPreferencesPage_29=the tag applied to the resource (version, branch, or date)
+CVSDecoratorPreferencesPage_30=the repository location's hostname
+CVSDecoratorPreferencesPage_31=the connection method (e.g. pserver, ssh)
+CVSDecoratorPreferencesPage_32=user name for the connection
+CVSDecoratorPreferencesPage_33=repository home directory on server
+CVSDecoratorPreferencesPage_34=root relative directory
+CVSDecoratorPreferencesPage_35=flag indicating that the folder has a child resource with outgoing changes
+CVSDecoratorPreferencesPage_36=org.eclipse.ui.preferencePages.Decorators
+CVSDecoratorPreferencesPage_37=See <a>''{0}''</a> to enable CVS decorations.
+CVSDecoratorPreferencesPage_38=the repository label
+CVSDecoratorPreferencesPage_39=Previe&w:
+
+
+CVSFilePropertiesPage_ignored=The file is ignored by CVS.
+CVSFilePropertiesPage_notManaged=The file is not managed by CVS.
+CVSFilePropertiesPage_isAdded=This file has been added to CVS control but has not been committed
+CVSFilePropertiesPage_baseRevision=Base revision:
+CVSFilePropertiesPage_baseTimestamp=Base timestamp:
+CVSFilePropertiesPage_modified=Modified:
+CVSFilePropertiesPage_keywordMode=Keyword mode:
+CVSFilePropertiesPage_tag=Tag:
+CVSFilePropertiesPage_none=HEAD
+CVSFilePropertiesPage_version={0} (Version)
+CVSFilePropertiesPage_branch={0} (Branch)
+CVSFilePropertiesPage_date={0} (Date)
+CVSFilePropertiesPage_error=An error occurred while creating this page.
+
+CVSFolderPropertiesPage_ignored=The folder is ignored by CVS.
+CVSFolderPropertiesPage_notManaged=The folder is not managed by CVS.
+CVSFolderPropertiesPage_notCVSFolder=This folder has lost its CVS sharing information.
+CVSFolderPropertiesPage_root=Repository root:
+CVSFolderPropertiesPage_repository=Repository path:
+CVSFolderPropertiesPage_static=Static:
+CVSFolderPropertiesPage_disconnect=&Disconnect...
+CVSFolderPropertiesPage_disconnectTitle=Disconnect folder?
+CVSFolderPropertiesPage_disconnectQuestion=Disconnecting the folder from CVS control will delete the CVS synchronization information for the folder. Are you sure you want to disconnect?
+
+
+
+CVSPropertiesPage_connectionType=&Connection type:
+CVSPropertiesPage_user=&User:
+CVSPropertiesPage_password=&Password:
+CVSPropertiesPage_host=&Host:
+CVSPropertiesPage_port=Port:
+CVSPropertiesPage_path=Repository p&ath:
+CVSPropertiesPage_module=Module:
+CVSPropertiesPage_defaultPort=Default
+CVSPropertiesPage_tag=Tag:
+CVSPreferencesPage_0=0 (disabled)
+CVSPreferencesPage_1=1
+CVSPreferencesPage_2=2
+CVSPreferencesPage_3=3
+CVSPreferencesPage_4=4
+CVSPreferencesPage_5=5
+CVSPreferencesPage_6=6
+CVSPreferencesPage_7=7
+CVSPreferencesPage_8=8
+CVSPreferencesPage_9=9 (highest compression)
+CVSPreferencesPage_10=None
+CVSPreferencesPage_11=Yes
+CVSPreferencesPage_12=No
+CVSPreferencesPage_13=Prompt
+CVSPreferencesPage_14=&General
+CVSPreferencesPage_15=&Validate server version compatibility on first connection
+CVSPreferencesPage_16=Confirm &move tag on tag operation
+CVSPreferencesPage_17=D&isplay detailed protocol output to stdout (for debugging purposes)
+CVSPreferencesPage_18=R&efresh tags when comparing or replacing tags
+CVSPreferencesPage_19=&Connection
+CVSPreferencesPage_23=C&onnection timeout (s):
+CVSPreferencesPage_24=Timeout must be positive
+CVSPreferencesPage_25=The timeout must be a number
+CVSPreferencesPage_26=&Quietness level:
+CVSPreferencesPage_27=Verbose
+CVSPreferencesPage_28=Somewhat quiet
+CVSPreferencesPage_29=Very quiet
+CVSPreferencesPage_20=Maximum &number of files displayed when committing:
+CVSPreferencesPage_21=Maximum files displayed must be positive
+CVSPreferencesPage_22=Maximum files displayed must be a number
+CVSPreferencesPage_30='Very Quiet' mode is dangerous
+CVSPreferencesPage_31=In 'Very Quiet' mode, some cvs servers may not communicate important information about errors that have occurred. You may want to consider using 'Somewhat quiet' mode instead.
+CVSPreferencesPage_32=Compre&ssion:
+CVSPreferencesPage_33=&Files and Folders
+CVSPreferencesPage_34=&Treat all new files as binary
+CVSPreferencesPage_35=Con&vert text files to use platform line ending
+CVSPreferencesPage_36=P&rune empty directories
+CVSPreferencesPage_37=D&elete unmanaged resources on replace
+CVSPreferencesPage_38=Default te&xt mode:
+CVSPreferencesPage_39=&Prompting
+CVSPreferencesPage_40=A&llow empty commit comments
+CVSPreferencesPage_41=A&utomatically save dirty editors before CVS operations
+CVSPreferencesPage_42=&Open perspective after a 'Show Annotations' operation
+CVSPreferencesPage_43=D&efault perspective for 'Show Annotations':
+CVSPreferencesPage_44=Aut&omatically share projects containing CVS meta information
+CVSPreferencesPage_45=Use .project &project name instead of module name on check out
+CVSPreferencesPage_46=Consult change &sets when synchronizing or committing
+CVSPropertiesPage_virtualModule=<no corresponding remote folder>
+
+CVSProxyPreferencePage_enableProxy=&Enable proxy connection
+CVSProxyPreferencePage_proxyTpe=Proxy &type:
+CVSProxyPreferencePage_proxyHost=Proxy host add&ress:
+CVSProxyPreferencePage_proxyPort=Proxy host p&ort:
+CVSProxyPreferencePage_enableProxyAuth=E&nable proxy authentication
+CVSProxyPreferencePage_proxyUser=Proxy &user name:
+CVSProxyPreferencePage_proxyPass=Proxy pa&ssword:
+CVSProxyPreferencePage_proxyPortError=Port must be a number between 0 and 65535.
+
+CVSRemoteFilePropertySource_name=Name
+CVSRemoteFilePropertySource_revision=Revision
+CVSRemoteFilePropertySource_date=Date
+CVSRemoteFilePropertySource_author=Author
+CVSRemoteFilePropertySource_comment=Comment
+
+CVSRemoteFolderPropertySource_name=Name
+CVSRemoteFolderPropertySource_tag=Tag
+CVSRemoteFolderPropertySource_none=(none)
+
+CVSRepositoryLocationPropertySource_default=Default
+CVSRepositoryLocationPropertySource_host=Host
+CVSRepositoryLocationPropertySource_user=User
+CVSRepositoryLocationPropertySource_port=Port
+CVSRepositoryLocationPropertySource_root=Repository path
+CVSRepositoryLocationPropertySource_method=Connection method
+
+
+CVSParticipant_0=Remote File ({0} - {1})
+CVSParticipant_1=Common Ancestor ({0} - {1})
+CVSParticipant_2=C&VS
+
+CVSUIPlugin_refreshTitle=Refresh Resource?
+CVSUIPlugin_refreshQuestion={0} Would you like to refresh resource ''{1}''?
+CVSUIPlugin_refreshMultipleQuestion={0} Would you like to refresh the selected resources?
+
+CVSAction_disabledTitle=Information
+CVSAction_disabledMessage=The chosen operation is not enabled.
+CVSAction_refreshTitle=Refresh Project?
+CVSAction_refreshQuestion={0} Would you like to refresh project ''{1}''?
+CVSAction_refreshMultipleQuestion={0} Would you like to refresh the projects of the selected resources?
+
+CommitAction_commitFailed=Problems encountered performing commit
+CommitWizardCommitPage_0=Commit
+CommitWizardCommitPage_2=Enter a comment for the commit operation.
+CommitWizardCommitPage_3=Please enter a commit comment.
+CommitWizardCommitPage_4=Conflicting changes cannot be committed. Either exclude them from the commit or use the synchronize view to resolve the conflicts.
+CommitWizardCommitPage_1=Hiding changes. The {0} changes exceeds the display threshold of {1}. It may take a long time to show this number of changes.
+CommitWizardCommitPage_5=Show &Changes
+CommitWizardFileTypePage_0=Add Resources
+CommitWizardFileTypePage_2=Unknown new files detected.
+CommitWizardFileTypePage_3=New files with the following unknown names or extensions have been detected in the workspace. Please specify whether these files should be stored as text or binary and whether this decision should be remembered.
+
+CommitSyncAction_questionRelease=You have changes that conflict with the server. Release those changes?
+CommitSyncAction_titleRelease=Confirm Overwrite
+CommitSyncAction_releaseAll=Release all changes, overriding any conflicting changes on the server.
+CommitSyncAction_releasePart=Only release the changes that don't conflict with changes on the server.
+CommitSyncAction_cancelRelease=Cancel the release operation.
+
+
+CompareWithRevisionAction_compare=Error Comparing with Revision
+CompareWithRevisionAction_noRevisions=No Revisions
+CompareWithRevisionAction_noRevisionsLong=The selected resource has no revisions to compare with.
+CompareWithRevisionAction_fetching=Fetching revisions from repository...
+
+CompareWithTagAction_message=Compare With Branch or Version
+
+CompareEditorInput_fileProgress=Comparing CVS file: {0}
+
+ConfigurationWizardAutoconnectPage_description=Your project already has CVS/ directories. It was probably previously shared, or checked out using another tool. It will be automatically shared using the following information.
+ConfigurationWizardAutoconnectPage_user=User:
+ConfigurationWizardAutoconnectPage_host=Host:
+ConfigurationWizardAutoconnectPage_port=Port:
+ConfigurationWizardAutoconnectPage_default=Default
+ConfigurationWizardAutoconnectPage_connectionType=Connection type:
+ConfigurationWizardAutoconnectPage_repositoryPath=Repository path:
+ConfigurationWizardAutoconnectPage_module=Module:
+ConfigurationWizardAutoconnectPage_validate=&Validate connection on finish
+ConfigurationWizardAutoconnectPage_noSyncInfo=Could not get folder information
+ConfigurationWizardAutoconnectPage_noCVSDirectory=Could not find CVS/ directory
+
+RepositorySelectionPage_description=This wizard will help you to share your files with the CVS repository for the first time. Your project will automatically be imported into the CVS repository, and the Commit wizard will open to allow you to commit your resources.
+RepositorySelectionPage_useExisting=&Use existing repository location:
+RepositorySelectionPage_useNew=&Create a new repository location
+
+ConfigurationWizardMainPage_connection=&Connection type:
+ConfigurationWizardMainPage_userName=&User:
+ConfigurationWizardMainPage_password=&Password:
+ConfigurationWizardMainPage_host=&Host:
+ConfigurationWizardMainPage_0=Location already exists.
+ConfigurationWizardMainPage_5=The host name must not start or end with a space
+ConfigurationWizardMainPage_6=The user name must not start or end with a space
+ConfigurationWizardMainPage_1=User Name Required
+ConfigurationWizardMainPage_2=Host Required
+ConfigurationWizardMainPage_3=Port Required
+ConfigurationWizardMainPage_4=Repository Path Required
+ConfigurationWizardMainPage_useDefaultPort=Use default p&ort
+ConfigurationWizardMainPage_usePort=Use por&t:
+ConfigurationWizardMainPage_repositoryPath=&Repository path:
+ConfigurationWizardMainPage_invalidUserName=Invalid User Name
+ConfigurationWizardMainPage_invalidHostName=Invalid Host Name
+ConfigurationWizardMainPage_invalidPort=Invalid Port
+ConfigurationWizardMainPage_invalidPathWithSpaces=The repository path cannot have segments with leading or trailing spaces
+ConfigurationWizardMainPage_invalidPathWithSlashes=The repository path cannot contain a double slash (//)
+ConfigurationWizardMainPage_invalidPathWithTrailingSlash=The repository path cannot end with a slash (/)
+ConfigurationWizardMainPage_useNTFormat=Use NT path names for specifying CVSNT repository paths (e.g. C:\\cvs\\root)
+
+Console_resultServerError={0} {1}
+Console_resultException=failed due to an internal error {0}
+Console_resultAborted=operation canceled {0}
+Console_resultOk=ok {0}
+Console_resultTimeFormat='(took 'm:ss.SSS')'
+Console_couldNotFormatTime=An error occurred formatting the output time for the CVS console.
+Console_preExecutionDelimiter=***
+Console_postExecutionDelimiter=***
+Console_info=Info: {0}
+Console_warning=Warning: {0}
+Console_error=Error: {0}
+
+AddToBranchAction_enterTag=Enter Branch Tag
+AddToBranchAction_enterTagLong=Enter the name of the branch:
+
+GenerateCVSDiff_title=Create Patch
+GenerateCVSDiff_pageTitle=Create a Patch Using the CVS Diff Command
+GenerateCVSDiff_pageDescription=The results of the CVS diff command can be used as an input file for the Apply Patch wizard.
+GenerateCVSDiff_overwriteTitle=Confirm Overwrite
+GenerateCVSDiff_overwriteMsg=A file with that name already exists. Overwrite?
+GenerateCVSDiff_error=Error running the CVS diff command
+GenerateCVSDiff_working=Running CVS diff...
+GenerateCVSDiff_noDiffsFoundMsg=No differences found.
+GenerateCVSDiff_noDiffsFoundTitle=CVS diff
+GenerateCVSDiff_1=Read-only file
+GenerateCVSDiff_2=The specified file is read-only and cannot be overwritten.
+
+HistoryFilterDialog_title = Filter Resource History
+HistoryFilterDialog_showMatching = Show entries matching:
+HistoryFilterDialog_matchingAny = a&ny of the provided criteria
+HistoryFilterDialog_matchingAll = a&ll of the provided criteria
+HistoryFilterDialog_author = &Author:
+HistoryFilterDialog_comment = &Comment containing:
+HistoryFilterDialog_fromDate = &From date (M/D/Y) :
+HistoryFilterDialog_toDate = &To date (M/D/Y) :
+
+HistoryView_getContentsAction=&Get Contents
+HistoryView_getRevisionAction=Get Sticky &Revision
+HistoryView_tagWithExistingAction=&Tag with Existing...
+HistoryView_copy=&Copy
+HistoryView_revision=Revision
+HistoryView_tags=Tags
+HistoryView_date=Date
+HistoryView_author=Author
+HistoryView_comment=Comment
+HistoryView_refreshLabel=&Refresh View
+HistoryView_refresh=Refresh View
+HistoryView_linkWithLabel=Link with Editor
+HistoryView_selectAll=Select &All
+HistoryView_showComment=Show Comment Viewer
+HistoryView_wrapComment=Wrap Comments
+HistoryView_showTags=Show Tag Viewer
+HistoryView_overwriteTitle=Overwrite local changes?
+HistoryView_overwriteMsg=You have local changes. Do you want to overwrite them?
+HistoryView_fetchHistoryJob=Fetching CVS revision history
+HistoryView_errorFetchingEntries=Error fetching entries for {0}
+
+IgnoreAction_ignore=Error Ignoring Resource
+
+
+
+MergeWizard_title=Merge
+MergeWizard_0=Select the merge points
+MergeWizard_1=Specify the branch or version to be merged and the common base version.
+MergeWizardPage_0=Preview the merge in the &synchronize view
+MergeWizardPage_1=Perform the merge into the &local workspace
+MergeWizardPage_2=&Branch or version to be merged (end tag):
+MergeWizardPage_3=Br&owse...
+MergeWizardPage_4=Choose End Tag
+MergeWizardPage_5=&Select end tag
+MergeWizardPage_6=Common base &version (start tag):
+MergeWizardPage_7=Bro&wse...
+MergeWizardPage_8=Choose Start Tag
+MergeWizardPage_9=&Select start tag
+MergeWizardPage_10=The specified end tag is not known to exist. Either enter a different tag or refresh the known tags.
+MergeWizardPage_11=The specified start tag is not known to exist. Either enter a different tag or refresh the known tags.
+MergeWizardPage_12=The start and end tags cannot be the same.
+MergeWizardPage_13=A start tag is required for previewing a merge in the synchronize view.
+MergeWizardPage_14=&Merge non-conflicting changes and only preview conflicts
+MergeWizardEndPage_branches=Branches
+
+ModuleSelectionPage_moduleIsProject=Use &project name as module name
+ModuleSelectionPage_specifyModule=Use &specified module name:
+
+ModeWizardSelectionPage_10=Propo&se
+ModeWizardSelectionPage_11=Automatically propose a new mode for the file based\non its name and extension. This can be configured on the\nTeam > File Content preference page.
+ModeWizardSelectionPage_12=S&elect All
+ModeWizardSelectionPage_13=Select &None
+ModeWizardSelectionPage_14=Only sho&w those files that will be changed
+ModeWizardSelectionPage_15=C&lear
+ModeWizardSelectionPage_17={0} files will be changed
+ModeWizardSelectionPage_18=SelectionPage
+ModeWizardSelectionPage_19=ASCII/Binary Property
+ModeWizardSelectionPage_20=Configure the way CVS transfers your files.
+ModeWizardSelectionPage_21=Fil&ter files by name (? = any character, * = any string)
+ModeWizardSelectionPage_22=C&hange the ASCII/Binary property for the selected files
+ModeWizardSelectionPage_23=For information about the different CVS ASCII/Binary modes refer to your CVS documentation.
+ModeWizardSelectionPage_24=Enter a c&ommit comment
+ModeWizardSelectionPage_25={0} files selected
+
+MoveTagAction_title=Tag with Existing Tag
+MoveTagAction_message=&Select the tag to be moved
+
+NewLocationWizard_title=Add CVS Repository
+NewLocationWizard_heading=Add a new CVS Repository
+NewLocationWizard_description=Add a new CVS Repository to the CVS Repositories view
+NewLocationWizard_validationFailedText=Error validating location: "{0}"\n\nKeep location anyway?
+NewLocationWizard_validationFailedTitle=Unable to Validate
+NewLocationWizard_exception=Unable to create repository location
+
+OpenLogEntryAction_deletedTitle=Resource is Deleted
+OpenLogEntryAction_deleted=The selected revision represents a deletion. It cannot be opened.
+
+ReleaseCommentDialog_title=Commit
+ReleaseCommentDialog_unaddedResources=Checked resources will be &added to CVS version control.
+ReleaseCommentDialog_selectAll=&Select All
+ReleaseCommentDialog_deselectAll=D&eselect All
+
+RemoteFolderElement_nameAndTag={0} {1}
+RemoteFolderElement_fetchingRemoteChildren=Fetching remote CVS children for ''{0}''...
+
+
+ReplaceWithTagAction_message=Replace with Branch or Version
+ReplaceWithTagAction_replace=Error Replacing With Tag
+
+ReplaceWithRemoteAction_problemMessage=Error Replacing With Latest From Repository
+
+ReplaceWithAction_confirmOverwrite=Confirm Overwrite
+ReplaceWithAction_localChanges={0} has local changes which you are about to overwrite. Do you wish to overwrite?
+ReplaceWithAction_calculatingDirtyResources=Finding outgoing changes...
+
+ReplaceWithLatestAction_multipleTags=La&test from Repository
+ReplaceWithLatestAction_multipleVersions=&Versions from Repository
+ReplaceWithLatestAction_multipleBranches=La&test from Branches
+ReplaceWithLatestAction_singleVersion=&Version {0}
+ReplaceWithLatestAction_singleBranch=La&test from Branch {0}
+ReplaceWithLatestAction_singleHEAD=La&test from {0}
+
+
+RepositoryManager_committing=Committing
+RepositoryManager_rename=An IO Exception occurred while renaming the state file
+RepositoryManager_save=An IO Exception occurred while saving the state file
+RepositoryManager_ioException=An IO Exception occurred while reading the state file
+RepositoryManager_parsingProblem=An error occurred parsing file ''{0}''.
+RepositoryManager_fetchingRemoteFolders=Fetching remote CVS folders for ''{0}''...
+
+RepositoriesView_refresh=&Refresh View
+RepositoriesView_refreshTooltip=Refresh View
+RepositoriesView_new=&Repository Location...
+RepositoriesView_newSubmenu=&New
+RepositoriesView_newAnonCVS=&Anonymous Repository Location to dev.eclipse.org...
+RepositoriesView_newWorkingSet=Select Working Set...
+RepositoriesView_deselectWorkingSet=Deselect Working Set
+RepositoriesView_editWorkingSet=Edit Active Working Set...
+RepositoriesView_workingSetMenuItem={0} {1}
+RepositoriesView_collapseAll=Collapse All
+RepositoriesView_collapseAllTooltip=Collapse All
+RepositoriesView_NItemsSelected={0} items selected
+RepositoriesView_OneItemSelected=1 item selected
+RepositoriesView_ResourceInRepository={0} in {1}
+RepositoriesView_CannotGetRevision=Cannot get revision
+RemoteViewPart_workingSetToolTip=Working Set: {0}
+
+ResourcePropertiesPage_status=Status
+ResourcePropertiesPage_notManaged=Not managed by CVS
+ResourcePropertiesPage_versioned=versioned
+ResourcePropertiesPage_notVersioned=not versioned
+#ResourcePropertiesPage.baseRevision=Base Revision
+#ResourcePropertiesPage.none=none
+ResourcePropertiesPage_error=Error
+
+
+
+
+
+
+
+
+SharingWizard_autoConnectTitle=Connect Project to Repository
+SharingWizard_autoConnectTitleDescription=Project is already configured with CVS repository information.
+SharingWizard_selectTagTitle=Select Tag
+SharingWizard_selectTag=&Select the tag to synchronize with:
+SharingWizard_importTitle=Share Project with CVS Repository
+SharingWizard_importTitleDescription=Select an existing repository location or create a new location.
+SharingWizard_title=Share Project
+SharingWizard_enterInformation=Enter Repository Location Information
+SharingWizard_enterInformationDescription=Define the location and protocol required to connect with an existing CVS repository.
+SharingWizard_enterModuleName=Enter Module Name
+SharingWizard_enterModuleNameDescription=Select the name of the module in the CVS repository.
+SharingWizard_validationFailedText={0}. Set project sharing anyway?
+SharingWizard_validationFailedTitle=Unable to Validate
+
+
+ShowHistoryAction_showHistory=Error occurred performing Show History
+
+SyncAction_noChangesTitle=No Changes
+SyncAction_noChangesMessage=There are no changes between the workspace resource and the remote.
+
+TagAction_tagErrorTitle=Tagging Error
+TagAction_tagWarningTitle=Tagging Warning
+TagAction_tagProblemsMessage=Problems reported tagging the resource.
+TagAction_tagProblemsMessageMultiple=Problems tagging the resources. {0} project(s) successfully tagged and {1} project(s) with errors.
+TagAction_tagResources=Tag Resources
+TagRefreshButtonArea_0=No Tags Found
+TagRefreshButtonArea_1=Perform &Deep Search
+TagRefreshButtonArea_2=Confi&gure Manually
+TagRefreshButtonArea_3=&Cancel
+TagRefreshButtonArea_4=Tags were not found for {0} using the auto-refresh files and a shallow cvs log operation. You can choose to search using a deep cvs log operation, to manually configure the tags or to cancel.
+TagRefreshButtonArea_5=Refreshing tags
+TagRefreshButtonArea_6=Refreshing tags...
+TagRefreshButtonArea_7=No tags could be found.
+TagAction_enterTag=&Please enter a version tag:
+TagAction_moveTag=&Move tag if it already exists
+TagRootElement_0=Dates
+TagLocalAction_0=The selected elements contain uncommitted changes that will not be tagged. Should the tag operation proceed?
+TagLocalAction_1=The following elements contain &uncommitted changes that will not be versioned.
+TagLocalAction_2=Tag with Uncommitted Changes
+TagAction_moveTagConfirmTitle=Confirm Move Existing Tag
+TagAction_moveTagConfirmMessage=If the tag {0} is already used in this project, it will be moved to the selected revisions. Are you sure you want to perform the tag operation?
+TagAction_uncommittedChangesTitle=Confirm Uncommitted Changes
+TagAction_uncommittedChanges=You are tagging ''{0}'' that has uncommitted changes. These changes are not in the repository and will not be included in the version you are creating. Do you still want to tag this resource?
+TagAction_existingVersions=Existing Versions
+
+TagInRepositoryAction_tagProblemsMessage=Problems reported tagging the resource.
+TagInRepositoryAction_tagProblemsMessageMultiple=Problems tagging the resources. {0} resource(s) successfully tagged and {1} resource(s) with errors.
+
+UpdateAction_update=Problems encountered performing update
+UpdateAction_promptForUpdateSeveral=Are you sure you want to update {0} resources?
+UpdateAction_promptForUpdateOne=Are you sure you want to update {0} resource?
+UpdateAction_promptForUpdateTitle=Confirm Update
+
+UpdateWizard_title=Update
+UpdateWizard_0=Select Tag
+UpdateWizard_1=Select the tag for the update
+
+UserValidationDialog_required=Password Required
+UserValidationDialog_labelUser={0}
+UserValidationDialog_labelPassword={1}
+UserValidationDialog_password=&Password:
+UserValidationDialog_user=&User name:
+
+KeyboradInteractiveDialog_message=Keyboard Interactive authentication for {0}
+KeyboardInteractiveDialog_labelRepository=Enter values for the following repository: {0}
+
+VersionsElement_versions=Versions
+
+WorkbenchUserAuthenticator_cancelled=Operation canceled because login was canceled
+WorkbenchUserAuthenticator_1=Host Key Change
+WorkbenchUserAuthenticator_2=The host key for {0} has changed. It is possible that this was intentional but there is also a chance that you are the target of an attack of some kind. If you know that the host key has changed, click OK and existing host key will be purged. Otherwise, click Cancel and consult with your system administrator
+
+Unmanage_title=Confirm Disconnect from CVS
+Unmanage_titleN=Confirm Multiple Project Disconnect from CVS
+Unmanage_option1=Do not delete the CVS meta information (e.g. CVS sub-directories).
+Unmanage_option2=Also delete the CVS meta information from the file system.
+Unmanage_unmanagingError=Errors occurred while disconnecting
+
+Unmanage_message=Are you sure you want to disconnect CVS from ''{0}''?
+Unmanage_messageN=Are you sure you want to disconnect CVS from these {0} projects?
+
+Save_To_Clipboard_2=&Save to clipboard
+Save_In_File_System_3=Sa&ve in file system
+Browse____4=Br&owse...
+Save_Patch_As_5=Save Patch As
+patch_txt_6=patch.txt
+Save_In_Workspace_7=Save in &workspace
+Select_a_folder_then_type_in_the_file_name__8=Select a Fol&der in the Workspace and Type in the Patch Name
+Fi_le_name__9=Fi&le name:
+Diff_output_format_12=Diff Output Format
+Unified__format_required_by_Compare_With_Patch_feature__13=&Unified (format required by the Apply Patch wizard)
+Context_14=&Context
+Standard_15=&Standard
+Advanced_options_19=Advanced Options
+Configure_the_options_used_for_the_CVS_diff_command_20=Configure the options used for the CVS diff command.
+
+
+TagSelectionDialog_Select_a_Tag_1=&Select a branch or version
+TagSelectionDialog_recurseOption=Recurse into sub-&folders
+TagSelectionDialog_0=&Add Date...
+TagSelectionDialog_1=&Remove
+TagSelectionDialog_7=Refreshing tags
+TagSelectionDialog_8=Error refreshing tags
+
+TagSelectionArea_0=&Matching tags:
+TagSelectionArea_1={0}:
+TagSelectionArea_2={0} (? = any character, * = any String):
+TagSelectionArea_3=Select a &tag
+TagSelectionWizardPage_0=&Use the tag currently associated with the workspace resources
+TagSelectionWizardPage_1=&Select the tag from the following list
+
+
+ExtMethodPreferencePage_message=These variables define the external connection program to use with the \'ext\' connection method. These values should be the same as the \'ext\' CVS command-line environment variable settings.
+ExtMethodPreferencePage_CVS_RSH=CVS_R&SH:
+ExtMethodPreferencePage_Browse=&Browse...
+ExtMethodPreferencePage_0=Use an &external program to connect
+ExtMethodPreferencePage_2=Choosing to use another connection method allows the meta information in CVS projects to be compatible with external CVS tools while using a custom connection method.
+ExtMethodPreferencePage_1=Use another connection &method type to connect
+ExtMethodPreferencePage_Details=Select a program or script
+ExtMethodPreferencePage_CVS_RSH_Parameters=&Parameters:
+ExtMethodPreferencePage_CVS_SERVER__7=CVS_SER&VER:
+UpdateMergeActionProblems_merging_remote_resources_into_workspace_1=Problems merging remote resources into workspace
+
+TagConfigurationDialog_1=Configure Branches and Versions for {0}
+TagConfigurationDialog_5=&Browse files for tags:
+TagConfigurationDialog_6=&New tags found in the selected files:
+TagConfigurationDialog_7=Remembered &tags for these projects:
+TagConfigurationDialog_8=&Add Checked Tags
+TagConfigurationDialog_9=&Remove
+TagConfigurationDialog_0=Add &Date...
+TagConfigurationDialog_10=Re&move All
+TagConfigurationDialog_11=&List of files to be automatically examined when refreshing tags:
+TagConfigurationDialog_12=A&dd Selected Files
+TagConfigurationDialog_13=Rem&ove
+TagConfigurationDialog_14=Error fetching tags from remote CVS files
+TagConfigurationDialog_20=&Refresh Tags
+TagConfigurationDialog_21=&Configure Tags...
+TagConfigurationDialog_22=Updating Tags
+TagConfigurationDialog_AddDateTag=Add Date...
+
+ConfigureTagsFromRepoViewConfigure_Tag_Error_1=Configure Tag Error
+RemoteRootAction_label=Discard location
+RemoteLogOperation_0=Fetching log information from {0}
+RemoteLogOperation_1=Fetching log information
+RemoveDateTagAction_0=&Remove
+RemoteRootAction_Unable_to_Discard_Location_1=Unable to Discard Location
+RemoteRootAction_Projects_in_the_local_workspace_are_shared_with__2=Projects in the local workspace are shared with {0}. This location cannot be discarded until all local projects are disconnected from it.
+RemoteRootAction_The_projects_that_are_shared_with_the_above_repository_are__4=The projects that are shared with the above repository are:
+
+BranchCategory_Branches_1=Branches
+VersionCategory_Versions_1=Versions
+HistoryView_______4=[...]
+
+CVSProjectPropertiesPage_connectionType=Connection type:
+CVSProjectPropertiesPage_user=User:
+CVSProjectPropertiesPage_Select_a_Repository_1=Select a Repository
+CVSProjectPropertiesPage_Select_a_CVS_repository_location_to_share_the_project_with__2=Select a compatible CVS repository location to share the project with:
+CVSProjectPropertiesPage_Change_Sharing_5=&Change Sharing...
+CVSProjectPropertiesPage_fetchAbsentDirectoriesOnUpdate=&Fetch absent or new directories when updating
+CVSProjectPropertiesPage_configureForWatchEdit=&Enable watch/edit for this project
+CVSProjectPropertiesPage_progressTaskName=Updating project's CVS properties
+CVSProjectPropertiesPage_setReadOnly=Setting all files read-only
+CVSPreferencesPage_QuickDiffAnnotate=Use &Quick Diff annotate mode for local file annotations
+CVSProjectPropertiesPage_clearReadOnly=Setting all files writable
+CVSRepositoryPropertiesPage_Confirm_Project_Sharing_Changes_1=Confirm Project Sharing Changes
+CVSRepositoryPropertiesPage_There_are_projects_in_the_workspace_shared_with_this_repository_2=There are projects in the workspace shared with this repository. The projects will be updated with the new information that you have entered
+CVSRepositoryPropertiesPage_sharedProject=The projects that are shared with {0} are:
+CVSHistoryFilterDialog_showLocalRevisions=Show local revisions
+CVSHistoryTableProvider_currentVersion=<current version>
+CVSHistoryPage_CombinedModeTooltip=Local and Remote Revisions
+CVSHistoryPage_ValidateChangeTitle=Modify Contents
+CVSHistoryPage_CompareRevisionAction=Compare
+CVSHistoryPage_ValidateChangeMessage=The contents of {0} are about to be modified.
+CVSHistoryPage_CompareModeToggleAction=Compare Mode
+CVSHistoryPage_CompareModeTooltip=Compare Mode
+CVSHistoryPage_FilterHistoryTooltip=Filter History
+CVSRepositoryPropertiesPage_useLocationAsLabel=Use the &repository identification string as the label
+CVSRepositoryPropertiesPage_useCustomLabel=Use a custom &label:
+
+CVSProjectSetSerializer_Confirm_Overwrite_Project_8=Confirm Overwrite Project
+CVSProjectSetSerializer_The_project__0__already_exists__Do_you_wish_to_overwrite_it__9=The project {0} already exists. Do you wish to overwrite it?
+
+IgnoreResourcesDialog_titleSingle=Add {0} to .cvsignore
+IgnoreResourcesDialog_titleMany=Add {0} resources to .cvsignore
+IgnoreResourcesDialog_prompt=Select what to add to the .cvsignore file(s):
+IgnoreResourcesDialog_addNameEntryButton=Resource(s) by name
+IgnoreResourcesDialog_addNameEntryExample=Examples: file1.so, file2.so, .rcfile, bin
+IgnoreResourcesDialog_addExtensionEntryButton=Wildcard extension
+IgnoreResourcesDialog_addExtensionEntryExample=Examples: *.so, *.rcfile, bin
+IgnoreResourcesDialog_addCustomEntryButton=Custom pattern
+IgnoreResourcesDialog_addCustomEntryExample=The wildcard characters '*' and '?' are permitted.
+IgnoreResourcesDialog_patternMustNotBeEmpty=Pattern must not be empty.
+IgnoreResourcesDialog_patternDoesNotMatchFile=Pattern does not match all selected resources: e.g. {0}
+
+
+CVSProjectPropertiesPage_You_can_change_the_sharing_of_this_project_to_another_repository_location__However__this_is_only_possible_if_the_new_location_is___compatible____on_the_same_host_with_the_same_repository_path___1=You can change the sharing of this project to another repository location. However, this is only possible if the new location is \"compatible\" (on the same host with the same repository path).
+
+ConfigurationWizardMainPage_Location_1=Location
+ConfigurationWizardMainPage_Authentication_2=Authentication
+ConfigurationWizardMainPage_Connection_3=Connection
+AlternateUserValidationDialog_Enter_Password_2=Enter Password
+AlternateUserValidationDialog_OK_6=OK
+AlternateUserValidationDialog_Cancel_7=Cancel
+AlternateUserValidationDialog_message=Enter the password for {0}:
+WorkbenchUserAuthenticator_The_operation_was_canceled_by_the_user_1=The operation was canceled by the user
+
+WorkingSetSelectionArea_workingSetOther=&Other...
+ListSelectionArea_selectAll=&Select All
+ListSelectionArea_deselectAll=&Deselect All
+
+RestoreFromRepositoryWizard_fileSelectionPageTitle=Restore from Repository
+RestoreFromRepositoryWizard_fileSelectionPageDescription=Select the revision of each file that should be restored.
+RestoreFromRepositoryFileSelectionPage_fileSelectionPaneTitle={0} - Select file to be restored:
+RestoreFromRepositoryFileSelectionPage_revisionSelectionPaneTitle={0} - Check revision to be restored:
+RestoreFromRepositoryFileSelectionPage_fileToRestore={0} ({1} to be restored)
+RestoreFromRepositoryFileSelectionPage_fileContentPaneTitle={0} {1} in ''{2}''
+RestoreFromRepositoryFileSelectionPage_emptyRevisionPane=Remote revisions of selected file:
+RestoreFromRepositoryFileSelectionPage_fileExists=File ''{0}'' already exists locally.
+RestoreFromRepositoryFileSelectionPage_revisionIsDeletion=Revision {0} of {1} is the deletion and can not be restored. Select another revision of this file.
+RestoreFromRepositoryAction_noFilesTitle=No Deleted Files Found
+RestoreFromRepositoryAction_noFilesMessage=There were no deleted files found on the repository in folder ''{0}''.
+
+RepositoryRoot_folderInfoMissing=Local folder ''{0}'' is not properly mapped to a remote folder.
+
+RepositoriesViewContentHandler_unmatchedTag=No matching end tag found for tag ''{0}'' while reading repositories View configuration file.
+RepositoriesViewContentHandler_missingAttribute=Required attribute ''{1}'' missing from tag ''{0}'' while reading repositories View configuration file.
+RepositoriesViewContentHandler_errorCreatingRoot=An error occurred trying to create repository ''{0}''.
+
+
+
+
+WatchEditPreferencePage_description=Settings for CVS Watch/Edit.
+WatchEditPreferencePage_checkoutReadOnly=&Configure projects to use Watch/Edit on checkout
+WatchEditPreferencePage_validateEditSaveAction=When read-only files are modified in an editor
+WatchEditPreferencePage_edit=Send a CVS &edit notification to the server
+WatchEditPreferencePage_0=Enable temporary &watches on edit
+WatchEditPreferencePage_editInBackground=Send a CVS edit notification to the server in the &background
+WatchEditPreferencePage_highjack=Edit the file &without informing the server
+WatchEditPreferencePage_editPrompt=Before a CVS edit notification is sent to the server
+WatchEditPreferencePage_neverPrompt=&Never prompt
+WatchEditPreferencePage_alwaysPrompt=Always &prompt
+WatchEditPreferencePage_onlyPrompt=&Only prompt if there are other editors
+WatchEditPreferencePage_updatePrompt=Update edited files
+WatchEditPreferencePage_autoUpdate=Always &update before editing
+WatchEditPreferencePage_promptUpdate=Prompt to update if out of &date
+WatchEditPreferencePage_neverUpdate=Ne&ver update
+
+Uneditaction_confirmMessage=Overwrite local changes to edited files?
+Uneditaction_confirmTitle=Confirm Unedit
+
+FileModificationValidator_vetoMessage=User vetoed file modification
+
+RefreshRemoteProjectWizard_title=Refresh Branches
+RefreshRemoteProjectWizard_0=Tags not found for some modules
+RefreshRemoteProjectWizard_1=Search Deeply
+RefreshRemoteProjectWizard_2=Skip
+RefreshRemoteProjectWizard_3=Tags were not found on module {0} using the auto-refresh files and a shallow cvs log operation. You can choose to search this module using a deep cvs log operation or skip it.
+RefreshRemoteProjectWizard_4=Tags were not found on {0} modules using the auto-refresh files and a shallow cvs log operation. You can choose to search these module using a deep cvs log operation or skip them.
+RefreshRemoteProjectSelectionPage_pageTitle=Select Projects
+RefreshRemoteProjectSelectionPage_pageDescription=Select the remote projects whose tags should be refreshed.
+RefreshRemoteProjectSelectionPage_selectRemoteProjects=This wizard helps discover the tags associated with one or more remote projects. &Check the projects whose tags you wish to refresh.
+RefreshRemoteProjectSelectionPage_noWorkingSet=Do not &use a working set
+RefreshRemoteProjectSelectionPage_workingSet=Select a &working set (matching projects will be checked):
+
+EditorsView_file=File name
+EditorsView_user=User name
+EditorsView_date=Date
+EditorsView_computer=Computer name
+
+EditorsDialog_title=Editors
+EditorsDialog_question=The resource already has editors. Do you still want to edit the resource and send a CVS edit notification to server?
+EditorsAction_classNotInitialized={0} not initialized
+
+
+RemoteFileEditorInput_fullPathAndRevision={0} {1}
+
+CheckoutOperation_thisResourceExists=The resource ''{0}'' already exists in the workspace and will be deleted. Proceed with the check out of ''{1}''?
+CheckoutOperation_thisExternalFileExists=The folder ''{0}'' exists in the local file system and will be deleted. Proceed with the check out of ''{1}''?
+CheckoutOperation_confirmOverwrite=Confirm Overwrite
+CheckoutOperation_scrubbingProject=Scrubbing project ''{0}''.
+CheckoutOperation_refreshingProject=Configuring project ''{0}''.
+
+CheckoutSingleProjectOperation_taskname=Checking out ''{0}'' from CVS
+CheckoutMultipleProjectsOperation_taskName=Checking out {0} folders from CVS
+
+CheckoutIntoOperation_taskname=Checking out {0} folders from CVS into ''{1}''
+CheckoutIntoOperation_targetIsFile=Folder ''{0}'' cannot be checked out because file ''{1}'' is in the way.
+CheckoutIntoOperation_targetIsFolder=Folder ''{0}'' cannot be checked out because folder ''{1}'' is in the way.
+CheckoutIntoOperation_targetIsPrunedFolder=Folder ''{0}'' cannot be checked out because it conflicts with the pruned folder ''{1}''.
+CheckoutIntoOperation_mappingAlreadyExists=Cannot checkout remote folder ''{0}'' into ''{1}'' because local folder ''{2}'' is already mapped to remote folder ''{0}''.
+CheckoutIntoOperation_cancelled=Checkout of ''{1}'' canceled by user.
+CheckoutIntoOperation_overwriteMessage=Folder ''{0}'' already exists and will be deleted. Continue?
+
+
+
+
+CheckoutAsWizard_title=Check Out As
+CheckoutAsWizard_error=Problems encountered performing checkout
+CheckoutAsMainPage_title=Check Out As
+CheckoutAsMainPage_Browse=B&rowse...
+CheckoutAsMainPage_description=Select the method of check out
+CheckoutAsMainPage_singleFolder=Choose how to check out folder ''{0}''
+CheckoutAsMainPage_asConfiguredProject=Check out as a project &configured using the New Project Wizard
+CheckoutAsMainPage_WorkingSetMultiple=&Add projects to a working set
+CheckoutAsMainPage_EmptyWorkingSetErrorMessage=No name in the Working Set field
+CheckoutAsMainPage_asSimpleProject=Check out as a &project in the workspace
+CheckoutAsMainPage_projectNameLabel=&Project Name:
+CheckoutAsMainPage_WorkingSetSingle=&Add project to a working set
+CheckoutAsMainPage_multipleFolders=Choose how to check out the {0} folders
+CheckoutAsMainPage_asProjects=Check out into the &workspace as projects
+CheckoutAsMainPage_intoProject=Check out &into an existing project
+
+CheckoutAsLocationSelectionPage_title=Check Out As
+CheckoutAsLocationSelectionPage_description=Select the project location
+CheckoutAsLocationSelectionPage_useDefaultLabel=Use default &workspace location
+CheckoutAsLocationSelectionPage_locationLabel=&Location:
+CheckoutAsLocationSelectionPage_parentDirectoryLabel=&Directory:
+CheckoutAsLocationSelectionPage_browseLabel=&Browse...
+CheckoutAsLocationSelectionPage_locationEmpty=Project contents directory must be specified.
+CheckoutAsLocationSelectionPage_invalidLocation=Invalid location path.
+CheckoutAsLocationSelectionPage_messageForSingle=Select the parent directory for project {0}.
+CheckoutAsLocationSelectionPage_messageForMulti=Select the parent directory for the {0} projects.
+CheckoutAsMainPage_WorkingSetExistsErrorMessage=A non-Resource Working Set already exists with the same name
+
+CheckoutAsProjectSelectionPage_title=Check Out Into
+CheckoutAsProjectSelectionPage_description=Select the local folder that is the target of the checkout operation.
+CheckoutAsProjectSelectionPage_name=Target folder &name:
+CheckoutAsProjectSelectionPage_treeLabel=&Parent of target folder:
+CheckoutAsProjectSelectionPage_showLabel=&Filter project list:
+CheckoutAsProjectSelectionPage_recurse=&Checkout subfolders
+CheckoutAsProjectSelectionPage_showAll=Show all valid target projects
+CheckoutAsProjectSelectionPage_showUnshared=Show unshared projects
+CheckoutAsProjectSelectionPage_showSameRepo=Show projects shared with the same repository
+CheckoutAsProjectSelectionPage_invalidFolderName=''{0}'' is not a valid folder name
+
+
+WorkspaceChangeSetCapability_1=New Set
+OpenCommitSetAction_20=Open Change in Compare Editor
+OpenCommitSetAction_21=Could not determine the repository location of the selected resources
+OpenChangeSetAction_0=[{0}] ({1})
+OpenChangeSetAction_1=CVS Change
+WorkspaceChangeSetCapability_2=New Change Set
+WorkspaceChangeSetCapability_3=Enter the name and comment for the new change set
+CVSChangeSetCollector_4=Retrieving revision histories
+CVSChangeSetCollector_0=Unassigned Remote Changes
+WorkspaceChangeSetCapability_7=Edit Change Set Comment
+WorkspaceChangeSetCapability_8=Edit the name and comment for the change set
+WorkspaceSubscriberContext_0=Could not update the meta-data for file {0} due to inconsistent internal state.
+WorkspaceSubscriberContext_1=Overwriting {0}
+WorkspaceSubscriberContext_2=Overwriting {0} resources
+WorkspaceSubscriberContext_3=Updating {0}
+WorkspaceSubscriberContext_4=Updating {0} resources
+WorkspaceTraversalAction_0=Looking for uncommitted changes
+WorkspaceModelParticipant_0=Updating all changes in {0}
+
+
+ProjectMetaFile_taskName=Looking for a remote meta file
+TagFromWorkspace_taskName=Tagging from workspace
+TagFromRepository_taskName=Tagging from repository
+UpdateOnlyMergeable_taskName=Updating mergeable changes
+UpdateDialog_overwriteTitle=Overwrite Local Changes?
+UpdateMergePreferencePage_0=&Never preview and use CVS text markup to indicate conflicts (not recommended)
+UpdateMergePreferencePage_1=When an update preview is required
+UpdateMergePreferencePage_2=Preview updates in a &dialog
+UpdateMergePreferencePage_3=Preview updates in the &Synchronize view
+UpdateDialog_overwriteMessage=Do you want to overwrite local changes?
+ReplaceOperation_taskName=CVS Replace
+UpdateOperation_taskName=CVS Update
+
+SafeUpdateAction_warnFilesWithConflictsTitle=Non-mergeable files
+SafeUpdateAction_warnFilesWithConflictsDescription=Some conflicting files cannot be merged automatically with the update action. They contain conflicting changes that will have to be merged manually. Use the Synchronize View to find the conflicts then merge the changes in a compare editor.
+
+ShowAnnotationAction_2=Annotate Binary File?
+ShowAnnotationAction_3=File {0} is marked as a binary file. The CVS annotation operation only works properly for files that contain text. Do you wish to continue?
+
+UpdateAction_jobName=CVS Update
+MergeUpdateAction_jobName=CVS Merge
+MergeUpdateAction_invalidSubscriber=Invalid subscriber: {0}
+CommitAction_jobName=CVS Commit
+CommitAction_0=Preparing to Commit
+CommitAction_1=Consult Change Sets
+CommitAction_2=Should change sets be consulted in order to determine which resources should be included in the commit?
+
+CommitCommentArea_0=<Click here to enter a commit comment>
+CommitCommentArea_1=<Choose a previously entered comment>
+CommitCommentArea_2=Empty commit comment
+CommitCommentArea_3=The commit comment is empty. Are you sure you would like to continue with an empty comment?
+CommitCommentArea_4=Re&member decision?
+CommitCommentArea_5=Configure Comment Templates...
+CommitCommentArea_6=Template
+
+CheckoutProjectOperation_8=Checking out ''{0}'' into project ''{1}''
+CheckoutProjectOperation_9=Checking out ''{0}'' into {1} projects
+CheckoutProjectOperation_0=Checkout of remote folder {0} canceled by user
+CheckoutProjectOperation_1=An error occurred checking out {0}: {1}
+CVSOperation_0=Errors occurred in {0} of {1} operations.
+CVSOperation_1=Show CVS Console
+CVSOperation_2=Show CVS Console
+CVSModelElement_0=Error
+CVSModelElement_1=Error fetching resource list from repository.
+CVSMergeContext_0=Determining remote changes
+CVSMergeContext_1=The state of {0} has been changed concurrently.
+CVSMergeContext_2=Refreshing remote changes
+CVSDecorator_exceptionMessage=Errors occurred while applying CVS decorations to resources.
+CVSDecoratorConfiguration_0=>
+CVSDecoratorConfiguration_1=*
+CVSDecoratorConfiguration_2={dirty_flag}{name} {revision} {tag} ({keyword})
+CVSDecoratorConfiguration_3={dirty_flag}{name} {tag}
+CVSDecoratorConfiguration_4={dirty_flag}{name} {tag} [{host}]
+FetchMembersOperation_0=Fetching members of {0}
+FetchAllMembersOperation_0=Fetching Members
+
+RemoteRevisionQuickDiffProvider_readingFile=Error reading remote file
+RemoteRevisionQuickDiffProvider_closingFile=Error closing remote file
+RemoteRevisionQuickDiffProvider_fetchingFile=CVS QuickDiff: fetching remote contents
+RemoteCompareOperation_0=Comparing tags {0} and {1} of {2}
+RefreshDirtyStateOperation_0=Problems encountered cleaning timestamps
+RefreshDirtyStateOperation_1=CVS Clean Timestamps
+IgnoreAction_0=Ignoring selected resources for project {0}
+IgnoreAction_1=Ignoring Resources
+GenerateDiffFileOperation_0=The file could not be written. Possible reasons are the directory is write-protected or not enough disk space is available.
+GenerateDiffFileOperation_1=The file could not be written due to an I/O error.
+GenerateDiffFileOperation_2=An I/O error occurred.
+GenerateDiffFileWizard_0=Please enter a valid location.
+GenerateDiffFileWizard_2=Please enter a file name.
+GenerateDiffFileWizard_3=The specified directory does not exist.
+GenerateDiffFileWizard_4=Please select a location in the workspace by browsing.
+GenerateDiffFileWizard_5=Please enter a valid filename.
+GenerateDiffFileWizard_6=&Workspace (Multi-project Apply Patch wizard specific)
+GenerateDiffFileWizard_7=&Project
+GenerateDiffFileWizard_8=S&election
+GenerateDiffFileWizard_9=Save Patch in Workspace
+GenerateDiffFileWizard_10=Patch Root
+GenerateDiffFileWizard_File_multisegments=File name cannot contain multiple segments
+GenerateDiffFileWizard_SelectAll=Select &All
+GenerateDiffFileWizard_DeselectAll=&Deselect All
+
+MergeSynchronizeParticipant_8=Missing id initializing cvs merge participant
+MergeSynchronizeParticipant_9=Unable to initialize cvs merge subscriber
+MergeSynchronizeParticipant_10=Could not restore CVS Merge in Synchronize view: {0}
+MergeSynchronizeParticipant_11=Root resource in cvs merge subscriber is no longer in workspace, ignoring: {0}
+MergeSynchronizeParticipant_12=Missing root resources for cvs merge subscriber: {0}
+DisconnectOperation_0=Disconnecting
+DisconnectOperation_1=Disconnecting {0}
+SubscriberConfirmMergedAction_0=Synchronization information is missing for resource {0}
+SubscriberConfirmMergedAction_jobName=Performing a CVS Mark as Merged operation on {0} resources.
+CVSSubscriberAction_0=Invalid attempt to make unsupervised resource {0} in-sync.
+ReconcileProjectOperation_0=Reconciling project {0} with remote folder {1}
+CheckoutToRemoteFolderOperation_0=Downloading folder {0}
+CVSRepositoryPropertiesPage_0=Confirm Host or Path Change
+CVSRepositoryPropertiesPage_1=You have chosen to change the host name or repository root path for this location. You should ensure that this new information still identifies the same repository.
+CompareRevertAction_0=Reverting {0} resources
+CompareParticipant_0={0} ({1})
+
+ComparePreferencePage_0=Options for CVS comparisons:
+ComparePreferencePage_1=Show the &file author in compare editors
+ComparePreferencePage_2=Automatically enable chan&ge set grouping in CVS synchronizations
+ComparePreferencePage_3=Show revision &comparisons in a dialog
+ComparePreferencePage_4=Con&sider file contents in comparisons
+ComparePreferencePage_6=See <a>''{0}''</a> for compare editor preferences.
+ComparePreferencePage_7=Allow &models (e.g. Java) to participate in synchronizations
+
+FileModificationValidator_3=Perform Edit?
+FileModificationValidator_4=A CVS edit notification is required to be sent to the server in order to allow editing of one or more selected files. Continue?
+FileModificationValidator_5=Perform Update?
+FileModificationValidator_6=Some of the files being edited have been modified on the server. Would you like to update before continuing?
+CVSSynchronizeWizard_0=Unknown
+Participant_comparing=Comparing
+Participant_merging=Merging
+
+
+CompareWithRevisionAction_4=Compare With Revision
+ReplaceWithRevisionAction_0=&Replace
+ReplaceWithRevisionAction_1=Replace With Revision
+
+ConsolePreferencesPage_4=&Show CVS console automatically when command is run
+ConsolePreferencesPage_5=&Limit console output
+ConsolePreferencesPage_6=&Fixed width console
+ConsolePreferencesPage_7=Character &width:
+ConsolePreferencesPage_8=Console &buffer size (characters):
+ConsolePreferencesPage_9=CVS Console Settings:
+
+SharingWizard_23=Share Project Resources
+SharingWizard_24=Review and commit resources to the repository. Use the context menu to perform additional operations on the resources.
+SharingWizard_25=Module ''{0}'' exists on the server. Select the tag to synchronize with.
+ReconcileProjectOperation_1=Local resource {0} is a file while the corresponding remote {1} is a folder
+ReconcileProjectOperation_2=Local resource {0} is a folder while the corresponding remote {1} is a file
+ShareProjectOperation_0=Sharing project {0} as {1}.
+SharingWizard_26=Keep Sharing?
+SharingWizard_27=Project {0} has been shared with a CVS repository. Do you want to keep it shared?
+SharingWizardSyncPage_3=The resources of project {0} are in-sync with the repository.
+SharingWizardSyncPage_4=An error has occurred populating this view.
+SharingWizardSyncPage_5=Show Errors
+SharingWizardSyncPage_8=Errors Occurred
+SharingWizardSyncPage_9=The following errors occurred.
+SharingWizardSyncPage_12=Launch the &Commit wizard
+ShareProjectOperation_1=Calculating synchronization states
+ShareProjectOperation_3=Mapping project {0} to {1}
+ShareProjectOperation_2=Preparing folder {0} for sharing
+CVSProjectPropertiesPage_31=&Show only compatible repository locations
+CVSProjectPropertiesPage_32=Confirm
+CVSProjectPropertiesPage_33=The selected repository location may not be compatible with the current location. Are you sure you want to change sharing to the new location?
+RepositoryEncodingPropertyPage_2=Identify the file system encoding used by the server where the repository is located. Setting this will allow file names and commit comments to be properly translated between the client and server in cases where the server encoding differs from the client.
+RepositoryEncodingPropertyPage_3=Server Encoding
+RepositoryEncodingPropertyPage_0=Cannot Change Encoding
+RepositoryEncodingPropertyPage_1=Properties for location {0} have been changed on another page. Please reopen the properties dialog to set the encoding.
+RepositoryEncodingPropertyPage_4=Note: this setting does not apply to file content encodings. File content encodings can be set on the Workbench/Editors preference page and on the Info property page of a project.
+CheckoutWizard_7=Checkout Project from CVS Repository
+CheckoutWizard_8=This wizard allows you to checkout projects from a CVS Repository.
+CheckoutWizard_0=Checkout from CVS
+CheckoutWizard_10=Select Module
+CheckoutWizard_11=Select the module to be checked out from CVS
+ModuleSelectionPage_2=Use an existing &module (this will allow you to browse the modules in the repository)
+CheckoutAsWizard_3=Select Tag
+CheckoutAsWizard_4=Choose the tag to check out from
+CheckoutAsMainPage_10=(Only available when the .project file does not exist in the repository)
+CVSTeamProvider_updatingFile=Updating {0}
+CVSHistoryTableProvider_base=<base>
+CVSHistoryPage_LocalModeAction=Local Mode
+CVSHistoryPage_OpenAction=&Open
+CVSHistoryPage_GroupByDate=Group Revisions by Date
+CVSHistoryPage_Today=Today
+CVSHistoryPage_Yesterday=Yesterday
+CVSHistoryPage_ThisMonth=This Month
+CVSHistoryPage_Previous=Previous
+CVSHistoryPage_NoFilter=No Filter
+CVSHistoryPage_FilterOn=Filter ...
+CVSHistoryPage_FilterDescription = {0} {1}
+CVSHistoryPage_FilterOnMessage=(Filter {0} matched of {1} revisions)
+CVSHistoryPage_EnterSearchTerm=Enter search term
+CVSHistoryPage_ShowSearchField=Show Search Field
+CVSHistoryPage_LocalModeTooltip=Local Revisions
+CVSHistoryPage_RemoteModeAction=Remote Mode
+CVSHistoryPage_RemoteModeTooltip=Remote Revisions
+CVSHistoryPage_CombinedModeAction=Remote Local Mode
+CVSHistoryPage_CollapseAllAction=Collapse All
+CVSHistoryPage_CollapseAllTooltip=Collapse All
+CVSHistoryPage_NoRevisionsForMode=No {0}
+CVSHistoryPage_NoRevisions=Revisions
+CVSTeamProvider_makeBranch=Creating branch
+CVSTeamProvider_folderInfo=Updating folder synchronization information for project {0}
+CVSTeamProvider_updatingFolder=Updating {0}
+AddOperation_0=Adding resources in {0} to version control
+BranchOperation_0=Branching
+BranchOperation_1=Branching {0}
+CommitOperation_0=Committing {0}
+CommitSetDialog_0=&Name:
+CommitSetDialog_2=Use the &title as the commit comment
+CommitSetDialog_3=Enter a commit &comment
+CommitWizard_0=Committing resources
+CommitWizard_1=Committing resources
+CommitWizard_2=Commit Files
+CommitWizard_3=CommitWizard
+CommitWizard_4=Collecting outgoing changes
+CommitWizard_6=Nothing to Commit
+CommitWizard_7=The selected resources do not contain any changes.
+UpdateOperation_0=Updating {0}
+ReplaceOperation_0=Replacing {0}
+ReplaceOperation_1=Scrubbing {0}
+TagOperation_0=Tagging {0}
+RemoteAnnotationStorage_1=As error occurred computing the content type of remote resource {0}
+DateTagCategory_0=Dates
+DateTagDialog_0=Date (M/D/Y):
+DateTagDialog_1=Include time component in tag
+DateTagDialog_2=Time (HH:MM:SS):
+DateTagDialog_3=Time is local
+DateTagDialog_4=Time is in universal time coordinates (UTC)
+DateTagDialog_5=Create Date Tag
+
+LogEntryCacheUpdateHandler_0=Errors have occurred while maintaining the log entry cache.
+LogEntryCacheUpdateHandler_1=Updating revision histories
+LogEntryCacheUpdateHandler_2=Could not fetch revision histories due to an internal timeout.
+MultiFolderTagSource_0={0} folders
+LocalProjectTagSource_0={0} Projects
+AnnotateView_0=Could not find an appropriate editor
+ModeWizard_0=ModeWizard
+ModeWizard_1=Change the ASCII/Binary Property
+ModeWizard_2=An error occurred
+ModeWizard_3=Setting file transfer mode...
+ModeWizard_4=Problems encountered while setting file transfer mode
+ModeWizard_5=Errors occurred
+ModeWizard_6=Warnings occurred
+
+ModeWizardSelectionPage_2=File
+ModeWizardSelectionPage_3=ASCII/Binary Property
+ModeWizardSelectionPage_4=Path
+ModeWizardSelectionPage_8=&Reset
+ModeWizardSelectionPage_9=Reset the selected files to their current mode
+ModelReplaceOperation_0=Overwrite Local Changes?
+ModelReplaceOperation_1=The selected elements contain local changes. You may choose to overwrite the changes or preview them.
+ModelReplaceOperation_2=&Overwrite
+ModelReplaceOperation_3=&Preview
+ModelCompareOperation_0=CVS Compare
+
+ReplaceWithTagAction_0=The selected elements contain uncommitted changes that will be overwritten. Should the replace proceed?
+ReplaceWithTagAction_1=The following elements contain &uncommitted changes that will be overwritten.
+ReplaceWithTagAction_2=Replace with Uncommitted Changes
+UncommittedChangesDialog_2=Select an item to see the dirty resources it contains.
+UncommittedChangesDialog_3=&The dirty resources contained in ''{0}''
+UncommittedChangesDialog_4=&The full path of ''{0}''
+AddWizard_0=Add to Version Control
+
+CommentTemplatesPreferencePage_Description=&Create, edit or remove comment templates:
+CommentTemplatesPreferencePage_New=&New...
+CommentTemplatesPreferencePage_Edit=&Edit...
+CommentTemplatesPreferencePage_Remove=&Remove
+CommentTemplatesPreferencePage_Preview=Previe&w:
+CommentTemplatesPreferencePage_EditCommentTemplateTitle=Enter Comment Template
+CommentTemplatesPreferencePage_EditCommentTemplateMessage=Please enter a comment template:
+DiffOperation_0=Creating Patch on {0}
+DiffOperation_1=Creating Patch
+WorkInProgress_EnableModelUpdate=&Allow models to participate when performing a CVS merge
+WorkInProgressPage_0=When performing an update
+WorkInProgressPage_1=&Preview all incoming changes before updating
+WorkInProgressPage_2=&Update all non-conflicting changes and then preview remaining conflicts
+CVSMappingMergeOperation_MergeInfoTitle=Conflicts Occurred
+CVSMappingMergeOperation_MergeInfoText=Some elements contained conflicts that could not be handled automatically. Conflicts will appear in the Synchronize View.
+CacheTreeContentsOperation_0=Fetching contents for changed files in {0}
+CacheTreeContentsOperation_1=Fetching contents for changed files
+OutgoingChangesDialog_0=An error occurred creating the details section.
+OutgoingChangesDialog_1=Creation of the details section was canceled.
+SyncAction_0=Synchronizing CVS
+SyncAction_1=Should change sets be consulted to determine which resources should be included in the synchronization?
+CreatePatchAction_0=Create Patch
+CreatePatchAction_1=There were no changes found to be included in a patch.
+AnnotatePreferencePage_AnnotatePrefPageTitle=Annotate
+AnnotatePreferencePage_AnnotatePrefPageMessage=Options for CVS Annotate:
+AnnotatePreferencePage_AnnotatePrefPageBinaryFileMessage=Attempt to annotate a &binary file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
new file mode 100644
index 000000000..876f12dae
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui.operations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.diff.IDiff;
+import org.eclipse.team.core.diff.IThreeWayDiff;
+import org.eclipse.team.core.history.IFileRevision;
+import org.eclipse.team.core.mapping.IResourceDiffTree;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.internal.ccvs.core.*;
+import org.eclipse.team.internal.ccvs.core.client.*;
+import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener;
+import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
+import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
+import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Abstract operation for caching the contents for any files
+ * in a particular remote tree that differ from the local contents.*
+ */
+public abstract class CacheTreeContentsOperation extends SingleCommandOperation {
+
+ private final IResourceDiffTree tree;
+
+ public CacheTreeContentsOperation(IWorkbenchPart part, ResourceMapping[] mappings, IResourceDiffTree tree) {
+ super(part, mappings, Command.NO_LOCAL_OPTIONS);
+ this.tree = tree;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], boolean, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
+ IResource[] files = getFilesWithUncachedContents(resources, recurse);
+ if (files.length > 0)
+ super.execute(provider, files, recurse, monitor);
+ }
+
+ private IResource[] getFilesWithUncachedContents(IResource[] resources, boolean recurse) {
+ ArrayList result = new ArrayList();
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ IDiff[] nodes = tree.getDiffs(resource, recurse ? IResource.DEPTH_INFINITE: IResource.DEPTH_ONE);
+ for (int j = 0; j < nodes.length; j++) {
+ IDiff node = nodes[j];
+ if (needsContents(node)) {
+ result.add(tree.getResource(node));
+ }
+ }
+ }
+ return (IResource[]) result.toArray(new IResource[result.size()]);
+ }
+
+ protected boolean needsContents(IDiff node) {
+ if (node instanceof IThreeWayDiff) {
+ IThreeWayDiff twd = (IThreeWayDiff) node;
+ IResource local = getTree().getResource(node);
+ IFileRevision remote = getRemoteFileState(twd);
+ if (remote != null) {
+ IResourceVariant variant = (IResourceVariant)Utils.getAdapter(remote, IResourceVariant.class);
+ if (local.getType() == IResource.FILE
+ && isEnabledForDirection(twd.getDirection())
+ && variant instanceof RemoteFile) {
+ RemoteFile rf = (RemoteFile) variant;
+ if (!rf.isContentsCached()) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get the remote file state that is of interest.
+ * @param twd a three way diff
+ * @return the remote file state that is of interest
+ */
+ protected abstract IFileRevision getRemoteFileState(IThreeWayDiff twd);
+
+ /**
+ * Return whether the direction is of interest.
+ * @param direction the direction of a diff
+ * @return whether the direction is of interest
+ */
+ protected abstract boolean isEnabledForDirection(int direction);
+
+ /* (non-Javadoc)
+ *
+ * Use a local root that is really the base tree so we can cache
+ * the base contents without affecting the local contents.
+ *
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getLocalRoot(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
+ */
+ protected ICVSFolder getLocalRoot(CVSTeamProvider provider)
+ throws CVSException {
+ try {
+ ICVSRemoteResource tree = buildTree(provider);
+ return (ICVSFolder)tree;
+ } catch (TeamException e) {
+ throw CVSException.wrapException(e);
+ }
+ }
+
+ protected abstract ICVSRemoteResource buildTree(CVSTeamProvider provider) throws TeamException;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getCVSArguments(org.eclipse.core.resources.IResource[])
+ */
+ protected ICVSResource[] getCVSArguments(Session session, IResource[] resources) {
+ List result = new ArrayList();
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ try {
+ ICVSResource file = session.getLocalRoot().getChild(resource.getProjectRelativePath().toString());
+ result.add(file);
+ } catch (CVSException e) {
+ // Log and continue
+ CVSUIPlugin.log(e);
+ }
+ }
+
+ return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.team.internal.ccvs.core.ICVSResource[], boolean, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
+ return Command.UPDATE.execute(
+ session,
+ Command.NO_GLOBAL_OPTIONS,
+ getLocalOptions(true),
+ resources,
+ new UpdateListener(new IUpdateMessageListener() {
+ public void fileInformation(int type, ICVSFolder parent, String filename) {
+ // Do nothing
+ }
+ public void fileDoesNotExist(ICVSFolder parent, String filename) {
+ // Do nothing
+ }
+ public void directoryInformation(ICVSFolder commandRoot, String path,
+ boolean newDirectory) {
+ // Do nothing
+ }
+ public void directoryDoesNotExist(ICVSFolder commandRoot, String path) {
+ // Do nothing
+ }
+ }),
+ monitor);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#getLocalOptions(boolean)
+ */
+ protected LocalOption[] getLocalOptions(boolean recurse) {
+ return Update.IGNORE_LOCAL_CHANGES.addTo(super.getLocalOptions(recurse));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
+ */
+ protected String getTaskName(CVSTeamProvider provider) {
+ return NLS.bind(CVSUIMessages.CacheTreeContentsOperation_0, new String[] {provider.getProject().getName()});
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
+ */
+ protected String getTaskName() {
+ return CVSUIMessages.CacheTreeContentsOperation_1;
+ }
+
+ /**
+ * Return the diff tree whose contents are being cached
+ * @return
+ */
+ protected IResourceDiffTree getTree() {
+ return tree;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#consultModelsForMappings()
+ */
+ public boolean consultModelsForMappings() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#isReportableError(org.eclipse.core.runtime.IStatus)
+ */
+ protected boolean isReportableError(IStatus status) {
+ return super.isReportableError(status) && status.getSeverity() == IStatus.ERROR;
+ }
+
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
new file mode 100644
index 000000000..d27fee6af
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui.wizards;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.team.internal.ccvs.core.CVSTag;
+import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
+import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
+import org.eclipse.team.internal.ccvs.ui.tags.TagContentAssistProcessor;
+import org.eclipse.team.internal.ccvs.ui.tags.TagRefreshButtonArea;
+import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionArea;
+import org.eclipse.team.internal.ccvs.ui.tags.TagSelectionDialog;
+import org.eclipse.team.internal.ccvs.ui.tags.TagSource;
+import org.eclipse.team.internal.ui.PixelConverter;
+import org.eclipse.team.internal.ui.SWTUtils;
+import org.eclipse.ui.PlatformUI;
+
+public class MergeWizardPage extends CVSWizardPage {
+
+ private Text endTagField;
+ private Button endTagBrowseButton;
+ private TagSource tagSource;
+ private Text startTagField;
+ private Button startTagBrowseButton;
+ private TagRefreshButtonArea tagRefreshArea;
+ private CVSTag startTag;
+ private CVSTag endTag;
+ private Button previewButton;
+ private Button noPreviewButton;
+ protected boolean preview = true;
+ private Button onlyPreviewConflicts;
+ private boolean isOnlyPreviewConflicts = false;
+
+ public MergeWizardPage(String pageName, String title, ImageDescriptor titleImage, String description, TagSource tagSource) {
+ super(pageName, title, titleImage, description);
+ this.tagSource = tagSource;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+
+ final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
+
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_DEFAULT));
+ // set F1 help
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.MERGE_WIZARD_PAGE);
+
+ final Composite mainArea = new Composite(composite, SWT.NONE);
+ mainArea.setLayoutData(SWTUtils.createHFillGridData());
+ mainArea.setLayout(SWTUtils.createGridLayout(2, converter, SWTUtils.MARGINS_NONE));
+
+ createEndTagArea(mainArea);
+ createStartTagArea(mainArea);
+ SWTUtils.equalizeControls(converter, new Button [] { endTagBrowseButton, startTagBrowseButton } );
+
+ createPreviewOptionArea(composite, converter);
+ createTagRefreshArea(composite);
+
+ Dialog.applyDialogFont(composite);
+ setControl(composite);
+ }
+
+ private void createPreviewOptionArea(Composite parent, PixelConverter converter) {
+
+ final Composite composite= new Composite(parent, SWT.NONE);
+ composite.setLayoutData(SWTUtils.createHFillGridData());
+ composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
+
+ previewButton = SWTUtils.createRadioButton(composite, CVSUIMessages.MergeWizardPage_0);
+ if (MergeWizard.isShowModelSync()) {
+ onlyPreviewConflicts = SWTUtils.createCheckBox(composite, CVSUIMessages.MergeWizardPage_14);
+ GridData data = SWTUtils.createHFillGridData(1);
+ data.horizontalIndent = 10;
+ onlyPreviewConflicts.setLayoutData(data);
+ }
+ noPreviewButton = SWTUtils.createRadioButton(composite, CVSUIMessages.MergeWizardPage_1);
+ SelectionAdapter selectionAdapter = new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ preview = previewButton.getSelection();
+ updateEnablements();
+ }
+ };
+ previewButton.setSelection(preview);
+ noPreviewButton.setSelection(!preview);
+ previewButton.addSelectionListener(selectionAdapter);
+ noPreviewButton.addSelectionListener(selectionAdapter);
+ if (onlyPreviewConflicts != null) {
+ onlyPreviewConflicts.setEnabled(preview);
+ onlyPreviewConflicts.setSelection(isOnlyPreviewConflicts);
+ onlyPreviewConflicts.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ isOnlyPreviewConflicts = onlyPreviewConflicts.getSelection();
+ }
+ });
+ }
+ }
+ private void createTagRefreshArea(Composite composite) {
+ tagRefreshArea = new TagRefreshButtonArea(getShell(), getTagSource(), null);
+ tagRefreshArea.setRunnableContext(getContainer());
+ tagRefreshArea.createArea(composite);
+ }
+
+ private void createEndTagArea(Composite parent) {
+ SWTUtils.createLabel(parent, CVSUIMessages.MergeWizardPage_2, 2);
+
+ endTagField = SWTUtils.createText(parent);
+ endTagField.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ updateEndTag(endTagField.getText());
+ }
+ });
+ final int endTagIncludeFlags = TagSelectionArea.INCLUDE_VERSIONS | TagSelectionArea.INCLUDE_BRANCHES | TagSelectionArea.INCLUDE_HEAD_TAG;
+ TagContentAssistProcessor.createContentAssistant(endTagField, tagSource, endTagIncludeFlags);
+ endTagBrowseButton = createPushButton(parent, CVSUIMessages.MergeWizardPage_3);
+
+ endTagBrowseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ TagSelectionDialog dialog = new TagSelectionDialog(getShell(), getTagSource(),
+ CVSUIMessages.MergeWizardPage_4,
+ CVSUIMessages.MergeWizardPage_5,
+ endTagIncludeFlags,
+ false, IHelpContextIds.MERGE_END_PAGE);
+ if (dialog.open() == Window.OK) {
+ CVSTag selectedTag = dialog.getResult();
+ setEndTag(selectedTag);
+ }
+ }
+ });
+ }
+
+ private void createStartTagArea(Composite parent) {
+
+ SWTUtils.createLabel(parent, CVSUIMessages.MergeWizardPage_6, 2);
+
+ startTagField = SWTUtils.createText(parent);
+ startTagField.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ updateStartTag(startTagField.getText());
+ }
+ });
+ TagContentAssistProcessor.createContentAssistant(startTagField, tagSource, TagSelectionArea.INCLUDE_VERSIONS);
+
+ startTagBrowseButton = createPushButton(parent, CVSUIMessages.MergeWizardPage_7);
+ startTagBrowseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ TagSelectionDialog dialog = new TagSelectionDialog(getShell(), getTagSource(),
+ CVSUIMessages.MergeWizardPage_8,
+ CVSUIMessages.MergeWizardPage_9,
+ TagSelectionDialog.INCLUDE_VERSIONS | TagSelectionDialog.INCLUDE_DATES,
+ false, IHelpContextIds.MERGE_START_PAGE);
+ if (dialog.open() == Window.OK) {
+ CVSTag selectedTag = dialog.getResult();
+ setStartTag(selectedTag);
+ }
+ }
+ });
+ }
+
+ protected void updateEndTag(String text) {
+ if (endTag == null || !endTag.getName().equals(text)) {
+ CVSTag tag = getTagFor(text, false);
+ setEndTag(tag);
+ }
+ updateEnablements();
+ }
+
+ protected void updateStartTag(String text) {
+ if (startTag == null || !startTag.getName().equals(text)) {
+ CVSTag tag = getTagFor(text, true);
+ setStartTag(tag);
+ }
+ updateEnablements();
+ }
+
+ private CVSTag getTagFor(String text, boolean versionsOnly) {
+ if (text.equals(CVSTag.DEFAULT.getName())) {
+ if (versionsOnly) return null;
+ return CVSTag.DEFAULT;
+ }
+ if (text.equals(CVSTag.BASE.getName())) {
+ if (versionsOnly) return null;
+ return CVSTag.BASE;
+ }
+ CVSTag[] tags;
+ if (versionsOnly) {
+ tags = tagSource.getTags(new int[] { CVSTag.VERSION, CVSTag.DATE });
+ } else {
+ tags = tagSource.getTags(new int[] { CVSTag.VERSION, CVSTag.BRANCH, CVSTag.DATE });
+ }
+ for (int i = 0; i < tags.length; i++) {
+ CVSTag tag = tags[i];
+ if (tag.getName().equals(text)) {
+ return tag;
+ }
+ }
+ return null;
+ }
+
+ protected void setEndTag(CVSTag selectedTag) {
+ if (selectedTag == null || endTag == null || !endTag.equals(selectedTag)) {
+ endTag = selectedTag;
+ if (endTagField != null) {
+ String name = endTagField.getText();
+ if (endTag != null)
+ name = endTag.getName();
+ if (!endTagField.getText().equals(name))
+ endTagField.setText(name);
+ if (startTag == null && endTag != null && endTag.getType() == CVSTag.BRANCH) {
+ CVSTag tag = findCommonBaseTag(endTag);
+ if (tag != null) {
+ setStartTag(tag);
+ }
+ }
+ }
+ updateEnablements();
+ }
+ }
+
+ protected void setStartTag(CVSTag selectedTag) {
+ if (selectedTag == null || startTag != null || endTag == null || !endTag.equals(selectedTag)) {
+ startTag = selectedTag;
+ if (startTagField != null) {
+ String name = startTagField.getText();
+ if (startTag != null)
+ name = startTag.getName();
+ if (!startTagField.getText().equals(name))
+ startTagField.setText(name);
+ }
+ updateEnablements();
+ }
+ }
+
+ private CVSTag findCommonBaseTag(CVSTag tag) {
+ CVSTag[] tags = tagSource.getTags(CVSTag.VERSION);
+ for (int i = 0; i < tags.length; i++) {
+ CVSTag potentialMatch = tags[i];
+ if (potentialMatch.getName().indexOf(tag.getName()) != -1) {
+ return potentialMatch;
+ }
+ }
+ return null;
+ }
+
+ private void updateEnablements() {
+ if (onlyPreviewConflicts != null)
+ onlyPreviewConflicts.setEnabled(preview);
+ if (endTag == null && endTagField.getText().length() > 0) {
+ setErrorMessage(CVSUIMessages.MergeWizardPage_10);
+ } else if (startTag == null && startTagField.getText().length() > 0) {
+ setErrorMessage(CVSUIMessages.MergeWizardPage_11);
+ } else if (endTag != null && startTag != null && startTag.equals(endTag)) {
+ setErrorMessage(CVSUIMessages.MergeWizardPage_12);
+ } else if (startTag == null && endTag != null && preview) {
+ setErrorMessage(CVSUIMessages.MergeWizardPage_13);
+ } else {
+ setErrorMessage(null);
+ }
+ setPageComplete((startTag != null || !preview) && endTag != null && (startTag == null || !startTag.equals(endTag)));
+ }
+
+ protected TagSource getTagSource() {
+ return tagSource;
+ }
+
+ private Button createPushButton(Composite parent, String label) {
+ final Button button = new Button(parent, SWT.PUSH);
+ button.setText(label);
+ button.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
+ return button;
+ }
+
+ public CVSTag getStartTag() {
+ return startTag;
+ }
+
+ public CVSTag getEndTag() {
+ return endTag;
+ }
+
+ public boolean isPreview() {
+ return preview;
+ }
+
+ public boolean isOnlyPreviewConflicts() {
+ return isOnlyPreviewConflicts;
+ }
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
new file mode 100644
index 000000000..4a77823cd
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
@@ -0,0 +1,834 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui.wizards;
+
+
+import java.text.Collator; // don't use ICU, pending resolution of issue
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Observable;
+import java.util.Observer;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
+import org.eclipse.team.internal.ccvs.core.util.StringMatcher;
+import org.eclipse.team.internal.ccvs.ui.*;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.team.internal.ccvs.ui.CommitCommentArea;
+import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
+import org.eclipse.team.internal.ccvs.ui.wizards.ModeWizard.ModeChange;
+import org.eclipse.team.internal.ui.PixelConverter;
+import org.eclipse.team.internal.ui.SWTUtils;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+//TODO: Filtering the TableViewer is currently slow for large amounts of files. 3.1M5 will feature a framework to help with this, so wait until it is there.
+//TODO: Files should be added to the viewer asynchronously, currently bringing up the dialog takes a lot of time for large selections (e.g. jdt.ui)
+
+public class ModeWizardSelectionPage extends WizardPage {
+
+ private final static class ModeChangeCellModifier implements ICellModifier {
+
+ private final ModeChangeTable fTable;
+
+ public ModeChangeCellModifier(ModeChangeTable table) {
+ fTable= table;
+ }
+
+ public boolean canModify(Object element, String property) {
+ return PROPERTY_MODE.equals(property);
+ }
+
+ public Object getValue(Object element, String property) {
+ if (PROPERTY_MODE.equals(property)) {
+ final KSubstOption mode= ((ModeChange)element).getNewMode();
+ for (int i = 0; i < MODES.length; i++) {
+ if (MODES[i].equals(mode)) {
+ return new Integer(i);
+ }
+ }
+ }
+ return null;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ if (element instanceof Item)
+ element= ((Item)element).getData();
+ if (PROPERTY_MODE.equals(property)) {
+ ((ModeChange)element).setNewMode(MODES[((Integer)value).intValue()]);
+ fTable.modelChanged(true);
+ }
+ }
+ }
+
+ private final static class ModeChangeLabelProvider implements ITableLabelProvider {
+
+ private final DecoratingLabelProvider fDecoratingLP;
+ private final ModeChangeTable fTable;
+
+ public ModeChangeLabelProvider(ModeChangeTable table) {
+ fTable= table;
+ fDecoratingLP= new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
+ fDecoratingLP.addListener(fTable);
+ }
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (columnIndex == INDEX_FILE) {
+ return fDecoratingLP.getImage(((ModeChange)element).getFile());
+ }
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ final ModeChange change= (ModeChange)element;
+ switch (columnIndex) {
+ case INDEX_FILE: return (change.hasChanged() ? "* " : "") + change.getFile().getName(); //$NON-NLS-1$ //$NON-NLS-2$
+ case INDEX_MODE: return change.getNewMode().getLongDisplayText();
+ case INDEX_PATH: return change.getFile().getFullPath().toOSString();
+ }
+ throw new IllegalArgumentException();
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void dispose() {
+ fDecoratingLP.removeListener(fTable);
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+ }
+
+ private final static class TableSorter extends ViewerSorter implements SelectionListener {
+
+ private final Collator fCollator;
+ private final TableViewer fViewer;
+ private final TableColumn fFile, fMode, fPath;
+
+ private int fIndex;
+ private boolean fAscending;
+
+
+ public TableSorter(TableViewer viewer, TableColumn fileColumn, TableColumn modeColumn, TableColumn pathColumn) {
+// TODO: possible issue, TableSorter's Collator not shared with base class. Might cause problem switching to ICU collation.
+ fCollator= Collator.getInstance();
+ fViewer= viewer;
+
+ fFile= fileColumn;
+ fMode= modeColumn;
+ fPath= pathColumn;
+
+// Set initial sorting to file column
+ fIndex= INDEX_FILE;
+ fViewer.getTable().setSortColumn(fFile);
+ fViewer.getTable().setSortDirection(SWT.DOWN);
+ fAscending= true;
+
+ fileColumn.addSelectionListener(this);
+ modeColumn.addSelectionListener(this);
+ pathColumn.addSelectionListener(this);
+ }
+
+ public int compare(Viewer viewer, Object e1, Object e2) {
+
+ final ModeChange mc1= (ModeChange)e1;
+ final ModeChange mc2= (ModeChange)e2;
+
+ final String s1, s2;
+
+ switch (fIndex) {
+
+ case INDEX_FILE:
+ s1= mc1.getFile().getName();
+ s2= mc2.getFile().getName();
+ break;
+
+ case INDEX_MODE:
+ s1= mc1.getNewMode().getLongDisplayText();
+ s2= mc2.getNewMode().getLongDisplayText();
+ break;
+
+ case INDEX_PATH:
+ s1= mc1.getFile().getFullPath().toOSString();
+ s2= mc2.getFile().getFullPath().toOSString();
+ break;
+
+ default:
+ throw new IllegalArgumentException();
+ }
+
+ final int compare= fCollator.compare(s1, s2);
+ return fAscending ? compare : -compare;
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ final int index= columnToIndex(e.widget);
+ if (index == fIndex) {
+ fIndex= index;
+ fAscending= !fAscending;
+ fViewer.getTable().setSortDirection(fAscending ? SWT.DOWN : SWT.UP);
+ } else {
+ fIndex= index;
+ TableColumn tableCol = null;
+ switch(fIndex){
+ case INDEX_FILE:
+ tableCol = fFile;
+ break;
+
+ case INDEX_MODE:
+ tableCol = fMode;
+ break;
+
+ case INDEX_PATH:
+ tableCol = fPath;
+ break;
+ }
+ fViewer.getTable().setSortColumn(tableCol);
+ fViewer.getTable().setSortDirection(fAscending ? SWT.DOWN : SWT.UP);
+ }
+ fViewer.refresh();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // nop
+ }
+
+ private int columnToIndex(Object column) {
+ if (column == fFile) return INDEX_FILE;
+ if (column == fMode) return INDEX_MODE;
+ if (column == fPath) return INDEX_PATH;
+ throw new IllegalArgumentException();
+ }
+ }
+
+ private static final class ModeChangeTable extends Observable implements ISelectionChangedListener, ILabelProviderListener {
+
+ private final List fChanges;
+ private final TableViewer fViewer;
+ private final Filter fFilter;
+ private int fNumberOfChanges;
+
+ public ModeChangeTable(Composite composite, PixelConverter converter, List changes) {
+
+ fChanges= changes;
+ fNumberOfChanges= 0;
+
+ /**
+ * Create a table.
+ */
+ final Table table = new Table(composite, SWT.V_SCROLL | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
+ table.setLayoutData(SWTUtils.createHVFillGridData());
+ table.setLinesVisible(false);
+ table.setHeaderVisible(true);
+
+ /**
+ * The 'File' column
+ */
+ final TableColumn fileColumn = new TableColumn(table, SWT.NONE, INDEX_FILE);
+ fileColumn.setWidth(converter.convertWidthInCharsToPixels(LARGE_COLUMN));
+ fileColumn.setText(CVSUIMessages.ModeWizardSelectionPage_2);
+ table.setSortColumn(fileColumn);
+ table.setSortDirection(SWT.DOWN);
+ /**
+ * The 'Mode' column
+ */
+ final TableColumn newModeColumn = new TableColumn(table, SWT.NONE, INDEX_MODE);
+ newModeColumn.setWidth(converter.convertWidthInCharsToPixels(COLUMN_MIN_WIDTH_IN_CHARS + 6));
+ newModeColumn.setText(CVSUIMessages.ModeWizardSelectionPage_3);
+
+ /**
+ * The 'Path' column
+ */
+ final TableColumn pathColumn= new TableColumn(table, SWT.NONE, INDEX_PATH);
+ pathColumn.setWidth(converter.convertWidthInCharsToPixels(50));
+ pathColumn.setText(CVSUIMessages.ModeWizardSelectionPage_4);
+
+
+ fViewer= new TableViewer(table);
+ fViewer.setContentProvider(new ModeChangeContentProvider());
+ fViewer.setLabelProvider(new ModeChangeLabelProvider(this));
+ fViewer.getControl().setLayoutData(SWTUtils.createHVFillGridData());
+
+ final CellEditor newModeEditor = new ComboBoxCellEditor(table, COMBO_TEXT, SWT.READ_ONLY);
+
+ fViewer.setCellEditors(new CellEditor [] { null, newModeEditor, null });
+ fViewer.setColumnProperties(new String [] { PROPERTY_FILE, PROPERTY_MODE, PROPERTY_CHANGED });
+ fViewer.setCellModifier(new ModeChangeCellModifier(this));
+
+ fViewer.addFilter(fFilter= new Filter());
+
+ fViewer.setSorter(new TableSorter(fViewer, fileColumn, newModeColumn, pathColumn));
+
+ fViewer.setInput(fChanges);
+
+ //TODO: CVSLightweightDecorator.decorate() is lighter than normal decs.
+ fViewer.addSelectionChangedListener(this);
+
+ fileColumn.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+
+ }
+ });
+
+ fViewer.refresh();
+ }
+
+ public TableViewer getViewer() {
+ return fViewer;
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ setChanged();
+ notifyObservers(fViewer.getSelection());
+ }
+
+ public void modelChanged(boolean updateLabels) {
+ fViewer.refresh(updateLabels);
+ fNumberOfChanges= 0;
+ for (Iterator iter = fChanges.iterator(); iter.hasNext();) {
+ ModeChange change = (ModeChange) iter.next();
+ if (change.hasChanged())
+ ++fNumberOfChanges;
+ }
+ setChanged();
+ notifyObservers();
+ }
+
+ public Filter getFilter() {
+ return fFilter;
+ }
+
+ public IStructuredSelection getSelection() {
+ return (IStructuredSelection)fViewer.getSelection();
+ }
+
+ public void labelProviderChanged(LabelProviderChangedEvent event) {
+ fViewer.refresh();
+ }
+
+ public void selectAll() {
+ fViewer.setSelection(new StructuredSelection(fChanges));
+ fViewer.getControl().setFocus();
+ }
+
+ public void selectNone() {
+ fViewer.setSelection(StructuredSelection.EMPTY);
+ fViewer.getControl().setFocus();
+ }
+
+ public int getNumberOfChanges() {
+ return fNumberOfChanges;
+ }
+ }
+
+ private static final class ModeChangeContentProvider implements IStructuredContentProvider {
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ public Object[] getElements(Object inputElement) {
+// new FetchJob(fViewer, (List)inputElement, fPattern);
+// return new Object[0];
+ return ((List)inputElement).toArray();
+ }
+
+ public void dispose() {
+ }
+ }
+
+ private static final class ModeCombo extends SelectionAdapter implements Observer {
+
+ private final Combo fCombo;
+ private final ModeChangeTable fTable;
+
+ public ModeCombo(ModeChangeTable table, Composite parent) {
+ fTable= table;
+ fCombo= new Combo(parent, SWT.READ_ONLY);
+ fCombo.setLayoutData(SWTUtils.createHFillGridData());
+ fCombo.setItems(COMBO_TEXT);
+ fCombo.addSelectionListener(this);
+ fTable.addObserver(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ final KSubstOption mode= MODES[fCombo.getSelectionIndex()];
+ final IStructuredSelection selection= fTable.getSelection();
+ for (final Iterator iter = selection.iterator(); iter.hasNext();) {
+ final ModeChange change = (ModeChange) iter.next();
+ change.setNewMode(mode);
+ }
+ fTable.modelChanged(true);
+ }
+
+ public void update(Observable o, Object arg) {
+ final IStructuredSelection selection= (IStructuredSelection)fTable.getViewer().getSelection();
+
+ if (selection.isEmpty()) {
+ fCombo.deselectAll();
+ fCombo.setEnabled(false);
+ } else {
+ fCombo.setEnabled(true);
+ final KSubstOption option= ((ModeChange)selection.getFirstElement()).getNewMode();
+ for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ if (option != ((ModeChange)iter.next()).getNewMode()) {
+ fCombo.deselectAll();
+ return;
+ }
+ }
+ fCombo.setText(option.getLongDisplayText());
+ }
+ }
+ }
+
+ private static final class Filter extends ViewerFilter {
+
+ private boolean fFilterUnchanged;
+ private StringMatcher fMatcher;
+
+ public Filter() {
+ fFilterUnchanged= false;
+ fMatcher= new StringMatcher("*", true, false); //$NON-NLS-1$
+ }
+
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ final ModeChange change= (ModeChange)element;
+ if (fFilterUnchanged && !change.hasChanged())
+ return false;
+ if (!fMatcher.match(change.getFile().getName()))
+ return false;
+ return true;
+ }
+
+ public void setPattern(String pattern) {
+ pattern= pattern.trim();
+ if (!pattern.endsWith("*")) { //$NON-NLS-1$
+ pattern += "*"; //$NON-NLS-1$
+ }
+ fMatcher= new StringMatcher(pattern, true, false);
+ }
+
+ public void filterUnchanged(boolean filter) {
+ fFilterUnchanged= filter;
+ }
+ }
+
+ private static final class ResetButton extends SelectionAdapter implements Observer {
+
+ private final ModeChangeTable fTable;
+ private final Button fButton;
+
+ public ResetButton(ModeChangeTable table, Composite parent, PixelConverter converter) {
+ final int buttonWidth= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ fTable= table;
+ fButton= new Button(parent, SWT.NONE);
+ fButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.CENTER, false, false));
+ fButton.setText(CVSUIMessages.ModeWizardSelectionPage_8);
+ fButton.setToolTipText(CVSUIMessages.ModeWizardSelectionPage_9);
+ fButton.addSelectionListener(this);
+ fTable.addObserver(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ fButton.setEnabled(false);
+ final IStructuredSelection selection= fTable.getSelection();
+ for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ final ModeChange change = (ModeChange) iter.next();
+ change.setNewMode(change.getMode());
+ }
+ fTable.modelChanged(true);
+ }
+
+ public void update(Observable o, Object arg) {
+ final IStructuredSelection selection= fTable.getSelection();
+ for (final Iterator iter = selection.iterator(); iter.hasNext();) {
+ if (((ModeChange)iter.next()).hasChanged()) {
+ fButton.setEnabled(true);
+ return;
+ }
+ }
+ fButton.setEnabled(false);
+ }
+ }
+
+ private static final class GuessButton extends SelectionAdapter implements Observer {
+
+ private final ModeChangeTable fTable;
+ private final Button fButton;
+
+ public GuessButton(ModeChangeTable table, Composite parent, PixelConverter converter) {
+ fTable= table;
+ final int buttonWidth= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ fButton= new Button(parent, SWT.NONE);
+ fButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.CENTER, false, false));
+ fButton.setText(CVSUIMessages.ModeWizardSelectionPage_10);
+ fButton.setToolTipText(CVSUIMessages.ModeWizardSelectionPage_11);
+ fButton.addSelectionListener(this);
+ fTable.addObserver(this);
+
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ final IStructuredSelection selection= fTable.getSelection();
+ for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ final ModeChange change = (ModeChange) iter.next();
+ change.setNewMode(KSubstOption.fromFile(change.getFile()));
+ }
+ fTable.modelChanged(true);
+ }
+
+ public void update(Observable o, Object arg) {
+ fButton.setEnabled(!fTable.getSelection().isEmpty());
+ }
+ }
+
+ private static final class SelectAllButton extends SelectionAdapter {
+
+ private final ModeWizardSelectionPage fPage;
+ private final Button fButton;
+
+ public SelectAllButton(ModeWizardSelectionPage page, Composite parent, PixelConverter converter) {
+ fPage= page;
+ final int buttonWidth= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ fButton= new Button(parent, SWT.NONE);
+ fButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.CENTER, false, false));
+ fButton.setText(CVSUIMessages.ModeWizardSelectionPage_12);
+ fButton.addSelectionListener(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ fPage.getTable().selectAll();
+ }
+ }
+
+ private static final class SelectNoneButton extends SelectionAdapter {
+
+ private final ModeWizardSelectionPage fPage;
+ private final Button fButton;
+
+ public SelectNoneButton(ModeWizardSelectionPage page, Composite parent, PixelConverter converter) {
+ fPage= page;
+ final int buttonWidth= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ fButton= new Button(parent, SWT.NONE);
+ fButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.CENTER, false, false));
+ fButton.setText(CVSUIMessages.ModeWizardSelectionPage_13);
+ fButton.addSelectionListener(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ fPage.getTable().selectNone();
+ }
+ }
+
+ private static final class ShowChangesOnlyCheckbox extends SelectionAdapter {
+
+ private final ModeWizardSelectionPage fPage;
+ private final Button fCheck;
+
+ public ShowChangesOnlyCheckbox(ModeWizardSelectionPage page, Composite parent) {
+ fPage= page;
+ fCheck= new Button(parent, SWT.CHECK);
+ fCheck.setText(CVSUIMessages.ModeWizardSelectionPage_14);
+ fCheck.setLayoutData(SWTUtils.createHFillGridData());
+ fCheck.setSelection(false);
+ fCheck.addSelectionListener(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ final ModeChangeTable table= fPage.getTable();
+ table.getFilter().filterUnchanged(fCheck.getSelection());
+ table.modelChanged(true);
+ }
+ }
+
+ private static final class FilterTextBox extends SelectionAdapter implements ModifyListener {
+ private final ModeWizardSelectionPage fPage;
+ private final Text fTextField;
+
+ public FilterTextBox(ModeWizardSelectionPage page, Composite parent, PixelConverter converter) {
+ fPage= page;
+ fTextField= new Text(parent, SWT.SINGLE | SWT.BORDER);
+ fTextField.setLayoutData(SWTUtils.createHFillGridData());
+
+ final int buttonWidth= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ final Button button= new Button(parent, SWT.PUSH);
+ button.setText(CVSUIMessages.ModeWizardSelectionPage_15);
+ button.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.CENTER, false, false));
+ button.addSelectionListener(this);
+
+ fTextField.addModifyListener(this);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ fTextField.setText(""); //$NON-NLS-1$
+ fTextField.setFocus();
+ }
+
+ public void modifyText(ModifyEvent e) {
+ final ModeChangeTable table= fPage.getTable();
+ table.getFilter().setPattern(fTextField.getText());
+ table.modelChanged(false);
+ }
+
+ public void setFocus() {
+ fTextField.setFocus();
+ }
+ }
+
+ private static final class ChangeCounterLabel implements Observer {
+
+ private final Label fLabel;
+ private final ModeChangeTable fTable;
+
+ ChangeCounterLabel(Composite parent, ModeChangeTable table) {
+ fTable= table;
+ fTable.addObserver(this);
+ fLabel= SWTUtils.createLabel(parent, null);
+ fLabel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
+ }
+
+ public void update(Observable o, Object arg) {
+ updateText(fTable.getNumberOfChanges());
+ }
+
+ /**
+ * @param numberOfChanges
+ */
+ private void updateText(int numberOfChanges) {
+ fLabel.setText(NLS.bind(CVSUIMessages.ModeWizardSelectionPage_17, new String[] { Integer.toString(numberOfChanges) }));
+ }
+
+ }
+
+ private static final class SelectionCounterLabel implements Observer {
+
+ private final Label fLabel;
+ private final ModeChangeTable fTable;
+
+ public SelectionCounterLabel(Composite parent, ModeChangeTable table) {
+ fTable= table;
+ fTable.addObserver(this);
+ fLabel= new Label(parent, SWT.WRAP | SWT.RIGHT);
+ fLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+ }
+
+ public void update(Observable o, Object arg) {
+ updateText(fTable.getSelection().size());
+ }
+
+ /**
+ * @param numberOfChanges
+ */
+ private void updateText(int selected) {
+ fLabel.setText(NLS.bind(CVSUIMessages.ModeWizardSelectionPage_25, new String[] { Integer.toString(selected) }));
+ }
+ }
+
+ private final static int LARGE_COLUMN= 50;
+
+ protected static final int INDEX_FILE= 0;
+ protected static final int INDEX_MODE= 1;
+ protected static final int INDEX_PATH= 2;
+
+ protected static final String PROPERTY_FILE= "file"; //$NON-NLS-1$
+ protected static final String PROPERTY_MODE= "mode"; //$NON-NLS-1$
+ protected static final String PROPERTY_CHANGED= "changed"; //$NON-NLS-1$
+
+ protected static final KSubstOption [] MODES;
+ protected static final String [] COMBO_TEXT;
+
+ static final int COLUMN_MIN_WIDTH_IN_CHARS;
+
+ static {
+ MODES= KSubstOption.getAllKSubstOptions();
+ Arrays.sort(MODES, new Comparator() {
+ public int compare(Object a, Object b) {
+ String aKey = ((KSubstOption)a).getLongDisplayText();
+ String bKey = ((KSubstOption) b).getLongDisplayText();
+ return aKey.compareTo(bKey);
+ }
+ });
+ COMBO_TEXT= new String[MODES.length];
+ int maxLength= 0;
+ for (int i = 0; i < MODES.length; i++) {
+ COMBO_TEXT[i]= MODES[i].getLongDisplayText();
+ if (COMBO_TEXT[i].length() > maxLength) maxLength= COMBO_TEXT[i].length();
+ }
+ COLUMN_MIN_WIDTH_IN_CHARS= maxLength;
+ }
+
+ private final List fChanges;
+ protected ModeChangeTable fTable;
+
+ private CommitCommentArea fCommentArea;
+
+ public ModeWizardSelectionPage(List modeChanges) {
+ super(CVSUIMessages.ModeWizardSelectionPage_18, CVSUIMessages.ModeWizardSelectionPage_19, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_KEYWORD)); //
+ setDescription(CVSUIMessages.ModeWizardSelectionPage_20);
+ fChanges= modeChanges;
+ }
+
+ public void createControl(final Composite parent) {
+
+ final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
+
+ final int horizontalSpace= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ final int verticalSpace= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+
+ /**
+ * The main composite with the vertical sash
+ */
+ final Composite mainComposite= SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_DEFAULT);
+ // set F1 help
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(mainComposite, IHelpContextIds.KEYWORD_SUBSTITUTION_PAGE);
+
+ final SashForm mainSash= new SashForm(mainComposite, SWT.VERTICAL);
+ mainSash.setLayoutData(SWTUtils.createHVFillGridData());
+
+ /**
+ * The composite with the filter box, the table and the selection and filter controls.
+ */
+ final Composite topComposite= SWTUtils.createHVFillComposite(mainSash, SWTUtils.MARGINS_NONE);
+ ((GridLayout)topComposite.getLayout()).marginBottom= verticalSpace;
+
+ final Composite topGroup= SWTUtils.createHVFillGroup(topComposite, CVSUIMessages.ModeWizardSelectionPage_21, SWTUtils.MARGINS_DIALOG);
+
+ final Composite filterComposite= SWTUtils.createHFillComposite(topGroup, SWTUtils.MARGINS_NONE, 2);
+ final FilterTextBox filterBox= new FilterTextBox(ModeWizardSelectionPage.this, filterComposite, converter);
+
+ fTable= new ModeChangeTable(topGroup, converter, fChanges);
+
+ final Composite selectionComposite= SWTUtils.createHFillComposite(topGroup, SWTUtils.MARGINS_NONE, 2);
+
+ new ChangeCounterLabel(selectionComposite, fTable);
+ new SelectionCounterLabel(selectionComposite, fTable);
+
+ new ShowChangesOnlyCheckbox(ModeWizardSelectionPage.this, selectionComposite);
+
+ final Composite buttonComposite= SWTUtils.createHFillComposite(selectionComposite, SWTUtils.MARGINS_NONE, 2);
+ buttonComposite.setLayoutData(new GridData());
+ new SelectAllButton(ModeWizardSelectionPage.this, buttonComposite, converter);
+ new SelectNoneButton(ModeWizardSelectionPage.this, buttonComposite, converter);
+
+ /**
+ * The bottom sash which separates the mode controls from the commit comment area
+ */
+ final SashForm bottomSash= new SashForm(mainSash, SWT.NONE);
+ bottomSash.setLayoutData(SWTUtils.createHFillGridData());
+
+ /**
+ * The left composite with the mode controls.
+ */
+ final Composite leftComposite= SWTUtils.createHVFillComposite(bottomSash, SWTUtils.MARGINS_NONE, 1);
+ ((GridLayout)leftComposite.getLayout()).marginRight= horizontalSpace;
+ ((GridLayout)leftComposite.getLayout()).marginTop= verticalSpace;
+
+ final Group leftGroup= SWTUtils.createHVFillGroup(leftComposite, CVSUIMessages.ModeWizardSelectionPage_22, SWTUtils.MARGINS_DIALOG, 3);
+
+ new ModeCombo(fTable, leftGroup);
+ new GuessButton(fTable, leftGroup, converter);
+ new ResetButton(fTable, leftGroup, converter);
+ SWTUtils.createPlaceholder(leftGroup, 1);
+ final Label infoLabel= SWTUtils.createLabel(leftGroup, CVSUIMessages.ModeWizardSelectionPage_23, 3);
+
+ fTable.addObserver(new Observer() {
+ public void update(Observable o, Object arg) {
+ final boolean enabled= !fTable.getSelection().isEmpty();
+ leftGroup.setEnabled(enabled);
+ infoLabel.setEnabled(enabled);
+ }
+ });
+
+ /**
+ * The right composite with the commit comment area.
+ */
+ final Composite rightComposite= SWTUtils.createHVFillComposite(bottomSash, SWTUtils.MARGINS_NONE);
+ ((GridLayout)rightComposite.getLayout()).marginLeft= horizontalSpace;
+ ((GridLayout)rightComposite.getLayout()).marginTop= verticalSpace;
+
+ final Group rightGroup= SWTUtils.createHVFillGroup(rightComposite, CVSUIMessages.ModeWizardSelectionPage_24, SWTUtils.MARGINS_DIALOG);
+ (fCommentArea= new CommitCommentArea()).createArea(rightGroup);
+
+ /**
+ * Set up the page
+ */
+ mainSash.setWeights(new int [] { 5, 2 });
+ bottomSash.setWeights(new int [] { 3, 2 });
+ fTable.modelChanged(true);
+ fTable.selectAll();
+ filterBox.setFocus();
+ setControl(mainComposite);
+ }
+
+ protected ModeChangeTable getTable() {
+ return fTable;
+ }
+
+ public List getChanges() {
+ final List changes= new ArrayList();
+ for (Iterator iter = fChanges.iterator(); iter.hasNext();) {
+ final ModeChange change = (ModeChange) iter.next();
+ if (change.hasChanged())
+ changes.add(change);
+ }
+ return changes;
+ }
+
+ public String getComment(Shell shell) {
+ return fCommentArea.getCommentWithPrompt(shell);
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
new file mode 100644
index 000000000..384a8f828
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
@@ -0,0 +1,693 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.team.internal.ui.history;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.team.core.history.IFileHistoryProvider;
+import org.eclipse.team.core.history.IFileRevision;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.ui.history.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.ide.ResourceUtil;
+import org.eclipse.ui.part.*;
+
+public class GenericHistoryView extends ViewPart implements IHistoryView {
+
+ class PageContainer {
+ private Page page;
+ private SubActionBars subBars;
+
+ public PageContainer(Page page) {
+ this.page = page;
+ }
+
+ public Page getPage() {
+ return page;
+ }
+
+ public void setPage(Page page) {
+ this.page = page;
+ }
+
+ public SubActionBars getSubBars() {
+ return subBars;
+ }
+
+ public void setSubBars(SubActionBars subBars) {
+ this.subBars = subBars;
+ }
+ }
+
+ /**
+ * The pagebook control, or <code>null</code> if not initialized.
+ */
+ private PageBook book;
+
+ /**
+ * View actions
+ */
+ private Action refreshAction;
+ private Action linkWithEditorAction;
+ private Action pinAction;
+
+ /**
+ * The page container for the default page.
+ */
+ private PageContainer defaultPageContainer;
+
+ /**
+ * The current page container
+ */
+ PageContainer currentPageContainer;
+
+ /**
+ * The drop target + drop target listener
+ */
+ DropTarget dropTarget;
+ GenericHistoryDropAdapter dropAdapter;
+
+ /**
+ * Keeps track of the last selected element (either by selecting or opening an editor)
+ */
+ private Object lastSelectedElement;
+
+ private IPartListener partListener = new IPartListener() {
+ public void partActivated(IWorkbenchPart part) {
+ if (part instanceof IEditorPart)
+ editorActivated((IEditorPart) part);
+ }
+
+ public void partBroughtToTop(IWorkbenchPart part) {
+ if (part == GenericHistoryView.this)
+ editorActivated(getViewSite().getPage().getActiveEditor());
+ }
+
+ public void partOpened(IWorkbenchPart part) {
+ if (part == GenericHistoryView.this)
+ editorActivated(getViewSite().getPage().getActiveEditor());
+ }
+
+ public void partClosed(IWorkbenchPart part) {
+ }
+
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+ };
+
+ private IPartListener2 partListener2 = new IPartListener2() {
+ public void partActivated(IWorkbenchPartReference ref) {
+ }
+
+ public void partBroughtToTop(IWorkbenchPartReference ref) {
+ }
+
+ public void partClosed(IWorkbenchPartReference ref) {
+ }
+
+ public void partDeactivated(IWorkbenchPartReference ref) {
+ }
+
+ public void partOpened(IWorkbenchPartReference ref) {
+ }
+
+ public void partHidden(IWorkbenchPartReference ref) {
+ }
+
+ public void partVisible(IWorkbenchPartReference ref) {
+ if (ref.getPart(true) == GenericHistoryView.this)
+ editorActivated(getViewSite().getPage().getActiveEditor());
+ }
+
+ public void partInputChanged(IWorkbenchPartReference ref) {
+ }
+ };
+
+ private ISelectionListener selectionListener = new ISelectionListener() {
+
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structSelection = (IStructuredSelection) selection;
+ //Always take the first element - this is not intended to work with multiple selection
+ //Also, hang on to this selection for future use in case the history view is not visible
+ lastSelectedElement = structSelection.getFirstElement();
+
+ if (!isLinkingEnabled() || !checkIfPageIsVisible()) {
+ return;
+ }
+
+ if (lastSelectedElement != null){
+ Object resource = Utils.getAdapter(lastSelectedElement, IResource.class);
+ if (resource != null)
+ itemDropped((IResource) resource, false);
+ else
+ itemDropped(lastSelectedElement, false);
+ //reset lastSelectedElement
+ lastSelectedElement = null;
+ }
+ }
+ }
+
+ };
+
+ private boolean linkingEnabled;
+
+ private boolean viewPinned;
+
+ /**
+ * Refreshes the global actions for the active page.
+ */
+ void refreshGlobalActionHandlers() {
+ // Clear old actions.
+ IActionBars bars = getViewSite().getActionBars();
+ bars.clearGlobalActionHandlers();
+
+ // Set new actions.
+ Map newActionHandlers = currentPageContainer.getSubBars().getGlobalActionHandlers();
+ if (newActionHandlers != null) {
+ Set keys = newActionHandlers.entrySet();
+ Iterator iter = keys.iterator();
+ while (iter.hasNext()) {
+ Map.Entry entry = (Map.Entry) iter.next();
+ bars.setGlobalActionHandler((String) entry.getKey(), (IAction) entry.getValue());
+ }
+ }
+
+ //add refresh action handler from history view
+ bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
+
+ }
+
+ public void createPartControl(Composite parent) {
+ // Create the page book.
+ book = new PageBook(parent, SWT.NONE);
+
+ this.linkingEnabled = TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IFileHistoryConstants.PREF_GENERIC_HISTORYVIEW_EDITOR_LINKING);
+
+ // Create the default page rec.
+ defaultPageContainer = createDefaultPage(book);
+
+ //Contribute toolbars
+ configureToolbars(getViewSite().getActionBars());
+
+ //add global action handler
+ getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
+
+ //initialize the drag and drop
+ initDragAndDrop();
+
+ // Show the default page
+ showPageRec(defaultPageContainer);
+
+ // add listener for editor page activation - this is to support editor
+ // linking
+ getSite().getPage().addPartListener(partListener);
+ getSite().getPage().addPartListener(partListener2);
+
+ // add listener for selections
+ getSite().getPage().addSelectionListener(selectionListener);
+ }
+
+ private void configureToolbars(IActionBars actionBars) {
+
+ pinAction = new Action(TeamUIMessages.GenericHistoryView_PinCurrentHistory, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PINNED)) {
+ public void run() {
+ if (isChecked()) {
+ //uncheck editor linking and disable
+ linkWithEditorAction.setChecked(false);
+ linkWithEditorAction.setEnabled(false);
+ setLinkingEnabled(false);
+ } else {
+ //renable the linking button
+ linkWithEditorAction.setEnabled(true);
+ }
+ setViewPinned(isChecked());
+ }
+ };
+ pinAction.setChecked(isViewPinned());
+ pinAction.setToolTipText(TeamUIMessages.GenericHistoryView_0);
+
+ refreshAction = new Action(TeamUIMessages.GenericHistoryView_Refresh, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_REFRESH)) {
+ public void run() {
+ ((IHistoryPage) currentPageContainer.getPage()).refresh();
+ }
+ };
+ refreshAction.setToolTipText(TeamUIMessages.GenericHistoryView_RefreshTooltip);
+ refreshAction.setEnabled(true);
+
+
+ linkWithEditorAction = new Action(TeamUIMessages.GenericHistoryView_LinkWithEditor, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_LINK_WITH)) {
+ public void run() {
+ setLinkingEnabled(isViewPinned() ? false : isChecked());
+ }
+ };
+ linkWithEditorAction.setChecked(isLinkingEnabled());
+ linkWithEditorAction.setToolTipText(TeamUIMessages.GenericHistoryView_LinkWithTooltip);
+
+ //Create the local tool bar
+ IToolBarManager tbm = actionBars.getToolBarManager();
+ tbm.add(new Separator("historyView")); //$NON-NLS-1$
+ tbm.appendToGroup("historyView", refreshAction); //$NON-NLS-1$
+ tbm.appendToGroup("historyView", linkWithEditorAction); //$NON-NLS-1$
+ tbm.appendToGroup("historyView", pinAction); //$NON-NLS-1$
+ tbm.update(false);
+ }
+
+ boolean isLinkingEnabled() {
+ return linkingEnabled;
+ }
+
+ /**
+ * Enabled linking to the active editor
+ * @param enabled flag indiciating whether linking is enabled
+ */
+ public void setLinkingEnabled(boolean enabled) {
+ this.linkingEnabled = enabled;
+
+ // remember the last setting in the dialog settings
+ TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IFileHistoryConstants.PREF_GENERIC_HISTORYVIEW_EDITOR_LINKING, enabled);
+
+ // if turning linking on, update the selection to correspond to the active editor
+ if (enabled) {
+ editorActivated(getSite().getPage().getActiveEditor());
+ }
+ }
+
+ /**
+ * Sets the current view pinned
+ * @param b
+ */
+ void setViewPinned(boolean pinned) {
+ this.viewPinned = pinned;
+ }
+
+ /**
+ * Adds drag and drop support to the history view.
+ */
+ void initDragAndDrop() {
+ int ops = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] {ResourceTransfer.getInstance(), PluginTransfer.getInstance()};
+
+ dropTarget = new DropTarget(book, ops);
+ dropTarget.setTransfer(transfers);
+ dropAdapter = new GenericHistoryDropAdapter(this);
+ dropTarget.addDropListener(dropAdapter);
+ }
+
+ public void setFocus() {
+ if (isLinkingEnabled()){
+ if (lastSelectedElement != null){
+ if (lastSelectedElement instanceof IEditorPart){
+ editorActivated((IEditorPart) lastSelectedElement);
+ } else {
+ Object resource = Utils.getAdapter(lastSelectedElement, IResource.class);
+ if (resource != null)
+ itemDropped((IResource) resource, false);
+ else
+ itemDropped(lastSelectedElement, false);
+ }
+ //reset lastSelectedElement to null to prevent updating history view if it just gets focus
+ lastSelectedElement = null;
+ }
+ }
+
+ if (currentPageContainer.page instanceof IPage){
+ ((IPage) currentPageContainer.page).setFocus();
+ }
+ }
+
+ /**
+ * Shows page contained in the given page record in this view. The page record must
+ * be one from this pagebook view.
+ * <p>
+ * The <code>PageBookView</code> implementation of this method asks the
+ * pagebook control to show the given page's control, and records that the
+ * given page is now current. Subclasses may extend.
+ * </p>
+ *
+ * @param pageContainer the page record containing the page to show
+ */
+ protected void showPageRec(PageContainer pageContainer) {
+ // If already showing do nothing
+ if (currentPageContainer == pageContainer)
+ return;
+ // If the page is the same, just set activeRec to pageRec
+ if (currentPageContainer != null && pageContainer != null && currentPageContainer == pageContainer) {
+ currentPageContainer = pageContainer;
+ return;
+ }
+
+ // Hide old page.
+ if (currentPageContainer != null) {
+ currentPageContainer.getSubBars().deactivate();
+ //give the current page a chance to dispose
+ currentPageContainer.getPage().dispose();
+ currentPageContainer.getSubBars().dispose();
+ }
+ // Show new page.
+ currentPageContainer = pageContainer;
+
+ Control pageControl = currentPageContainer.getPage().getControl();
+ if (pageControl != null && !pageControl.isDisposed()) {
+ // Verify that the page control is not disposed
+ // If we are closing, it may have already been disposed
+ book.showPage(pageControl);
+ currentPageContainer.getSubBars().activate();
+ refreshGlobalActionHandlers();
+ // Update action bars.
+ getViewSite().getActionBars().updateActionBars();
+ }
+ }
+
+ /**
+ * Initializes the given page with a page site.
+ * <p>
+ * Subclasses should call this method after
+ * the page is created but before creating its
+ * controls.
+ * </p>
+ * <p>
+ * Subclasses may override
+ * </p>
+ * @param page The page to initialize
+ */
+ protected PageSite initPage(IPageBookViewPage page) {
+ try {
+ PageSite site = new PageSite(getViewSite());
+ page.init(site);
+ return site;
+ } catch (PartInitException e) {
+ TeamUIPlugin.log(e);
+ }
+ return null;
+ }
+
+ public IHistoryPage itemDropped(Object object, boolean refresh) {
+
+ //check to see if history view is visible - if it's not, don't bother
+ //going to the trouble of fetching the history
+ if (!this.getSite().getPage().isPartVisible(this))
+ return null;
+
+
+ IResource resource = Utils.getResource(object);
+ if (resource != null) {
+
+ //check to see if this resource is alreadu being displayed in another page
+ IHistoryPage existingPage = checkForExistingPage(object, resource.getName(), refresh);
+ if (existingPage != null){
+ return existingPage;
+ }
+
+ //now check to see if this view is pinned
+ IHistoryPage pinnedPage = checkForPinnedView(object, resource.getName(), refresh);
+ if (pinnedPage != null)
+ return pinnedPage;
+
+ //check to see if resource is managed
+ RepositoryProvider teamProvider = RepositoryProvider.getProvider(resource.getProject());
+ //couldn't find a repo provider; try showing it in a local page
+ Object tempPageSource = null;
+ if (teamProvider == null){
+ tempPageSource = new LocalHistoryPageSource();
+ } else {
+ IFileHistoryProvider fileHistory = teamProvider.getFileHistoryProvider();
+
+ if (fileHistory != null) {
+ tempPageSource = Utils.getAdapter(fileHistory, IHistoryPageSource.class,true);
+ }
+ if (tempPageSource == null) {
+ tempPageSource = Utils.getAdapter(teamProvider, IHistoryPageSource.class,true);
+ }
+ }
+
+ if (tempPageSource instanceof IHistoryPageSource) {
+ IHistoryPageSource pageSource = (IHistoryPageSource) tempPageSource;
+
+ //If a current page exists, see if it can handle the dropped item
+ if (currentPageContainer.getPage() instanceof IHistoryPage) {
+ PageContainer tempPageContainer = currentPageContainer;
+ if (!((IHistoryPage) tempPageContainer.getPage()).isValidInput(resource)) {
+ tempPageContainer = createPage(pageSource, resource);
+ }
+ if (tempPageContainer != null) {
+ if (((IHistoryPage) tempPageContainer.getPage()).setInput(resource)){
+ ((HistoryPage) tempPageContainer.getPage()).setHistoryView(this);
+ setContentDescription(resource.getName());
+ showPageRec(tempPageContainer);
+ return (IHistoryPage) tempPageContainer.getPage();
+ }
+ } else {
+ showPageRec(defaultPageContainer);
+ }
+ }
+ }
+ }
+ else if (object != null){
+ IHistoryPageSource historyPageSource = (IHistoryPageSource) Utils.getAdapter(object, IHistoryPageSource.class);
+ //Check to see that this object can be adapted to an IHistoryPageSource, else
+ //we don't know how to display it
+ if (historyPageSource == null)
+ return null;
+
+ //If a current page exists, see if it can handle the dropped item
+ if (currentPageContainer.getPage() instanceof IHistoryPage) {
+ PageContainer tempPageContainer = currentPageContainer;
+ if (!((IHistoryPage) tempPageContainer.getPage()).isValidInput(object)) {
+ tempPageContainer = createPage(historyPageSource, object);
+ }
+ if (tempPageContainer != null) {
+
+ //check to see if this resource is alreadu being displayed in another page
+ IHistoryPage existingPage = checkForExistingPage(object, ((IHistoryPage) tempPageContainer.getPage()).getName(), refresh);
+ if (existingPage != null){
+ return existingPage;
+ }
+
+ IHistoryPage pinnedPage = checkForPinnedView(object, ((IHistoryPage) tempPageContainer.getPage()).getName(), refresh);
+ if (pinnedPage != null)
+ return pinnedPage;
+
+ if (((IHistoryPage) tempPageContainer.getPage()).setInput(object)){
+ ((HistoryPage) tempPageContainer.getPage()).setHistoryView(this);
+ setContentDescription(((IHistoryPage) tempPageContainer.getPage()).getName());
+ showPageRec(tempPageContainer);
+ return (IHistoryPage) tempPageContainer.getPage();
+ }
+ } else {
+ showPageRec(defaultPageContainer);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private IHistoryPage checkForPinnedView(Object object, String objectName, boolean refresh) {
+ if (isViewPinned()) {
+ try {
+ IViewPart view = null;
+ //check to see if a view already contains this object
+ String id = VIEW_ID + System.currentTimeMillis();
+ IHistoryPage page = searchHistoryViewsForObject(object, refresh);
+ if (page != null)
+ return page;
+
+ //check to see if an unpinned version of the history view exists
+ GenericHistoryView historyView = findUnpinnedHistoryView();
+ if (historyView != null){
+ getSite().getPage().activate(historyView);
+ return historyView.itemDropped(object, refresh);
+ }
+
+ view = getSite().getPage().showView(VIEW_ID, id, IWorkbenchPage.VIEW_CREATE);
+ getSite().getPage().activate(view);
+ if (view instanceof GenericHistoryView)
+ return ((GenericHistoryView) view).itemDropped(object, refresh);
+
+ } catch (PartInitException e) {
+ }
+ }
+ return null;
+ }
+
+ private IHistoryPage checkForExistingPage(Object object, String objectName, boolean refresh) {
+ //first check to see if the main history view contains the current resource
+ if (currentPageContainer != null &&
+ ((IHistoryPage)currentPageContainer.getPage()).getInput() != null){
+ if (((IHistoryPage)currentPageContainer.getPage()).getInput().equals(object)){
+ //current page contains object, so just refresh it
+ IHistoryPage tempPage =((IHistoryPage)currentPageContainer.getPage());
+ if (refresh)
+ tempPage.refresh();
+
+ return tempPage;
+ }
+ }
+
+ return searchHistoryViewsForObject(object, refresh);
+ }
+
+ private IHistoryPage searchHistoryViewsForObject(Object object, boolean refresh) {
+ IWorkbenchPage page = getSite().getPage();
+ IViewReference[] historyViews = page.getViewReferences();
+ for (int i = 0; i < historyViews.length; i++) {
+ if (historyViews[i].getId().equals(VIEW_ID)){
+ IViewPart historyView = historyViews[i].getView(true);
+ if (historyView != null){
+ IHistoryPage historyPage = ((IHistoryView)historyView).getHistoryPage();
+ if (historyPage != null){
+ Object input = historyPage.getInput();
+ if (input != null && input.equals(object)){
+ //this view already contains the file, so just reuse it
+ getSite().getPage().bringToTop(historyView);
+ return ((GenericHistoryView) historyView).itemDropped(object, refresh);
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private GenericHistoryView findUnpinnedHistoryView(){
+ IWorkbenchPage page = getSite().getPage();
+ IViewReference[] historyViews = page.getViewReferences();
+ for (int i = 0; i < historyViews.length; i++) {
+ if (historyViews[i].getId().equals(VIEW_ID)){
+ IViewPart historyView = historyViews[i].getView(false);
+ if (!((GenericHistoryView)historyView).isViewPinned())
+ return (GenericHistoryView) historyView;
+ }
+ }
+
+ return null;
+ }
+
+ boolean isViewPinned() {
+ return viewPinned;
+ }
+
+ private PageContainer createPage(IHistoryPageSource participant, Object object) {
+ Page page = participant.createPage(object);
+ PageSite site = initPage(page);
+ ((IHistoryPage) page).setSite(new WorkbenchHistoryPageSite(this, page.getSite()));
+ page.createControl(book);
+ PageContainer container = new PageContainer(page);
+ container.setSubBars((SubActionBars) site.getActionBars());
+ return container;
+ }
+
+ protected PageContainer createDefaultPage(PageBook book) {
+ GenericHistoryViewDefaultPage page = new GenericHistoryViewDefaultPage();
+ PageSite site = initPage(page);
+ page.createControl(book);
+ PageContainer container = new PageContainer(page);
+ container.setSubBars((SubActionBars) site.getActionBars());
+ return container;
+ }
+
+ /**
+ * An editor has been activated. Fetch the history if the file is shared and the history view
+ * is visible in the current page.
+ *
+ * @param editor the active editor
+ */
+ protected void editorActivated(IEditorPart editor) {
+ //If this history view is not visible, keep track of this editor
+ //for future use
+ if (editor != null && !checkIfPageIsVisible())
+ lastSelectedElement = editor;
+
+ //Only fetch contents if the view is shown in the current page.
+ if (editor == null || !isLinkingEnabled() || !checkIfPageIsVisible() || isViewPinned()) {
+ return;
+ }
+ IEditorInput input = editor.getEditorInput();
+
+ if (input instanceof FileRevisionEditorInput) {
+ //See if the input adapts to a file revision
+ Object fileRev =((FileRevisionEditorInput) input).getAdapter(IFileRevision.class);
+ if (fileRev != null){
+ itemDropped(fileRev, false);
+ }
+ } // Handle regular file editors
+ else {
+ IFile file = ResourceUtil.getFile(input);
+ if (file != null) {
+ itemDropped(file, false); /* don't fetch if already cached */
+ }
+
+ //see if it adapts to an IHistoryPageSource
+ Object pageSource = Utils.getAdapter(input, IHistoryPageSource.class);
+ if (pageSource != null)
+ itemDropped(input, false);
+ }
+ }
+
+ private boolean checkIfPageIsVisible() {
+ return getViewSite().getPage().isPartVisible(this);
+ }
+
+ public void dispose() {
+ super.dispose();
+ //Remove the drop listener
+ if (dropTarget != null && !dropTarget.isDisposed())
+ dropTarget.removeDropListener(dropAdapter);
+ //Call dispose on current and default pages
+ currentPageContainer.getPage().dispose();
+ defaultPageContainer.getPage().dispose();
+ currentPageContainer = null;
+ defaultPageContainer = null;
+ //Remove the part listeners
+ getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(partListener2);
+ //Remove the selection listener
+ getSite().getPage().removeSelectionListener(selectionListener);
+ }
+
+ public IHistoryPage showHistoryFor(Object object) {
+ return itemDropped(object, true);
+ }
+
+ public IHistoryPage getHistoryPage() {
+ if (currentPageContainer != null &&
+ currentPageContainer.getPage() != null)
+ return (IHistoryPage) currentPageContainer.getPage();
+
+ return (IHistoryPage) defaultPageContainer.getPage();
+ }
+
+ /**
+ * Updates the content description of the view with the passed
+ * in string.
+ * @param description
+ */
+ public void updateContentDescription(String description){
+ setContentDescription(description);
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
new file mode 100644
index 000000000..795e4bf6d
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
@@ -0,0 +1,683 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.history;
+
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IOpenEventListener;
+import org.eclipse.jface.util.OpenStrategy;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.core.*;
+import org.eclipse.team.core.history.IFileHistory;
+import org.eclipse.team.core.history.IFileRevision;
+import org.eclipse.team.internal.core.history.LocalFileHistory;
+import org.eclipse.team.internal.core.history.LocalFileRevision;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.actions.CompareRevisionAction;
+import org.eclipse.team.internal.ui.actions.OpenRevisionAction;
+import org.eclipse.team.ui.history.HistoryPage;
+import org.eclipse.team.ui.history.IHistoryPageSite;
+import org.eclipse.ui.*;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.progress.IProgressConstants;
+
+import com.ibm.icu.util.Calendar;
+
+public class LocalHistoryPage extends HistoryPage {
+
+ /* private */ IFile file;
+ /* private */ IFileRevision currentFileRevision;
+
+ // cached for efficiency
+ /* private */ LocalFileHistory localFileHistory;
+ /* private */IFileRevision[] entries;
+
+ /* private */ TreeViewer treeViewer;
+
+ /* private */boolean shutdown = false;
+
+ //grouping on
+ private boolean groupingOn;
+
+ //toggle constants for default click action
+ private boolean compareMode = false;
+
+ protected LocalHistoryTableProvider historyTableProvider;
+ private RefreshFileHistory refreshFileHistoryJob;
+ private Composite localComposite;
+ private Action groupByDateMode;
+ private Action collapseAll;
+ private Action compareModeAction;
+ private Action getContentsAction;
+ private CompareRevisionAction compareAction;
+ private OpenRevisionAction openAction;
+
+ private HistoryResourceListener resourceListener;
+
+ private IFileRevision currentSelection;
+
+ public boolean inputSet() {
+ currentFileRevision = null;
+ IFile tempFile = getFile();
+ this.file = tempFile;
+ if (tempFile == null)
+ return false;
+
+ //blank current input only after we're sure that we have a file
+ //to fetch history for
+ this.treeViewer.setInput(null);
+
+ localFileHistory = new LocalFileHistory(file);
+
+ if (refreshFileHistoryJob == null)
+ refreshFileHistoryJob = new RefreshFileHistory();
+
+ //always refresh the history if the input gets set
+ refreshHistory(true);
+ return true;
+ }
+
+ private IFile getFile() {
+ Object obj = getInput();
+ if (obj instanceof IFile)
+ return (IFile) obj;
+
+ return null;
+ }
+
+ private void refreshHistory(boolean refetch) {
+ if (refreshFileHistoryJob.getState() != Job.NONE){
+ refreshFileHistoryJob.cancel();
+ }
+ refreshFileHistoryJob.setFileHistory(localFileHistory);
+ refreshFileHistoryJob.setGrouping(groupingOn);
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ Utils.schedule(refreshFileHistoryJob, getWorkbenchSite(parentSite));
+ }
+
+ private IWorkbenchPartSite getWorkbenchSite(IHistoryPageSite parentSite) {
+ IWorkbenchPart part = parentSite.getPart();
+ if (part != null)
+ return part.getSite();
+ return null;
+ }
+
+ public void createControl(Composite parent) {
+
+ localComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ localComposite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessVerticalSpace = true;
+ localComposite.setLayoutData(data);
+
+ treeViewer = createTree(localComposite);
+
+ contributeActions();
+
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ if (parentSite != null && parentSite instanceof DialogHistoryPageSite && treeViewer != null)
+ parentSite.setSelectionProvider(treeViewer);
+
+ resourceListener = new HistoryResourceListener();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ private void contributeActions() {
+ final IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
+ //Group by Date
+ groupByDateMode = new Action(TeamUIMessages.LocalHistoryPage_GroupRevisionsByDateAction, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY)){
+ public void run() {
+ groupingOn = !groupingOn;
+ store.setValue(IPreferenceIds.PREF_GROUPBYDATE_MODE, groupingOn);
+ refreshHistory(false);
+ }
+ };
+ groupingOn = store.getBoolean(IPreferenceIds.PREF_GROUPBYDATE_MODE);
+ groupByDateMode.setChecked(groupingOn);
+ groupByDateMode.setToolTipText(TeamUIMessages.LocalHistoryPage_GroupRevisionsByDateTip);
+ groupByDateMode.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY));
+ groupByDateMode.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY));
+
+ //Collapse All
+ collapseAll = new Action(TeamUIMessages.LocalHistoryPage_CollapseAllAction, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL)) {
+ public void run() {
+ treeViewer.collapseAll();
+ }
+ };
+ collapseAll.setToolTipText(TeamUIMessages.LocalHistoryPage_CollapseAllTip);
+ collapseAll.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL));
+ collapseAll.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL));
+
+ //Compare Mode Action
+ compareModeAction = new Action(TeamUIMessages.LocalHistoryPage_CompareModeAction,TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW)) {
+ public void run() {
+ compareMode = !compareMode;
+ compareModeAction.setChecked(compareMode);
+ }
+ };
+ compareModeAction.setToolTipText(TeamUIMessages.LocalHistoryPage_CompareModeTip);
+ compareModeAction.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
+ compareModeAction.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
+ compareModeAction.setChecked(false);
+
+ getContentsAction = getContextMenuAction(TeamUIMessages.LocalHistoryPage_GetContents, true /* needs progress */, new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask(null, 100);
+ try {
+ if(confirmOverwrite()) {
+ IStorage currentStorage = currentSelection.getStorage(new SubProgressMonitor(monitor, 50));
+ InputStream in = currentStorage.getContents();
+ (file).setContents(in, false, true, new SubProgressMonitor(monitor, 50));
+ }
+ } catch (TeamException e) {
+ throw new CoreException(e.getStatus());
+ } finally {
+ monitor.done();
+ }
+ }
+ });
+ //TODO: Doc help
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(getContentsAction, );
+
+ // Click Compare action
+ compareAction = new CompareRevisionAction(TeamUIMessages.LocalHistoryPage_CompareAction);
+ treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ compareAction.setCurrentFileRevision(getCurrentFileRevision());
+ compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ }
+ });
+ compareAction.setPage(this);
+
+ openAction = new OpenRevisionAction(TeamUIMessages.LocalHistoryPage_OpenAction);
+ treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ openAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ }
+ });
+ openAction.setPage(this);
+
+ OpenStrategy handler = new OpenStrategy(treeViewer.getTree());
+ handler.addOpenListener(new IOpenEventListener() {
+ public void handleOpen(SelectionEvent e) {
+ StructuredSelection tableStructuredSelection = (StructuredSelection) treeViewer.getSelection();
+ if (compareMode){
+ StructuredSelection sel = new StructuredSelection(new Object[] {getCurrentFileRevision(), tableStructuredSelection.getFirstElement()});
+ compareAction.selectionChanged(sel);
+ compareAction.run();
+ } else {
+ //Pass in the entire structured selection to allow for multiple editor openings
+ StructuredSelection sel = tableStructuredSelection;
+ openAction.selectionChanged(sel);
+ openAction.run();
+ }
+ }
+ });
+
+ //Contribute actions to popup menu
+ MenuManager menuMgr = new MenuManager();
+ Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuMgr) {
+ fillTableMenu(menuMgr);
+ }
+ });
+ menuMgr.setRemoveAllWhenShown(true);
+ treeViewer.getTree().setMenu(menu);
+
+ //Don't add the object contribution menu items if this page is hosted in a dialog
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ if (!parentSite.isModal()) {
+ IWorkbenchPart part = parentSite.getPart();
+ if (part != null) {
+ IWorkbenchPartSite workbenchPartSite = part.getSite();
+ workbenchPartSite.registerContextMenu(menuMgr, treeViewer);
+ }
+ IPageSite pageSite = parentSite.getWorkbenchPageSite();
+ if (pageSite != null) {
+ IActionBars actionBars = pageSite.getActionBars();
+ // Contribute toggle text visible to the toolbar drop-down
+ IMenuManager actionBarsMenu = actionBars.getMenuManager();
+ if (actionBarsMenu != null){
+ actionBarsMenu.removeAll();
+ }
+ actionBars.updateActionBars();
+ }
+ }
+
+ //Create the local tool bar
+ IToolBarManager tbm = parentSite.getToolBarManager();
+ if (tbm != null) {
+ String fileNameQualifier = getFileNameQualifier();
+ //Add groups
+ tbm.add(new Separator(fileNameQualifier+"grouping")); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"grouping", groupByDateMode); //$NON-NLS-1$
+ tbm.add(new Separator(fileNameQualifier+"collapse")); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"collapse", collapseAll); //$NON-NLS-1$
+ tbm.appendToGroup(fileNameQualifier+"collapse", compareModeAction); //$NON-NLS-1$
+ tbm.update(false);
+ }
+
+ }
+
+ private String getFileNameQualifier() {
+ if (file != null)
+ return file.getFullPath().toString();
+
+ return ""; //$NON-NLS-1$
+ }
+
+ protected void fillTableMenu(IMenuManager manager) {
+ // file actions go first (view file)
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ if (file != null && !parentSite.isModal()){
+ manager.add(openAction);
+ manager.add(compareAction);
+ ISelection sel = treeViewer.getSelection();
+ if (!sel.isEmpty()) {
+ if (sel instanceof IStructuredSelection) {
+ IStructuredSelection tempSelection = (IStructuredSelection) sel;
+ if (tempSelection.size() == 1) {
+ manager.add(new Separator("getContents")); //$NON-NLS-1$
+ manager.add(getContentsAction);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates the tree that displays the local file revisions
+ *
+ * @param parent the parent composite to contain the group
+ * @return the group control
+ */
+ protected TreeViewer createTree(Composite parent) {
+
+ historyTableProvider = new LocalHistoryTableProvider();
+ TreeViewer viewer = historyTableProvider.createTree(parent);
+
+ viewer.setContentProvider(new ITreeContentProvider() {
+ public Object[] getElements(Object inputElement) {
+
+ // The entries of already been fetch so return them
+ if (entries != null)
+ return entries;
+
+ if (!(inputElement instanceof IFileHistory) &&
+ !(inputElement instanceof AbstractHistoryCategory[]))
+ return new Object[0];
+
+ if (inputElement instanceof AbstractHistoryCategory[]){
+ return (AbstractHistoryCategory[]) inputElement;
+ }
+
+ final IFileHistory fileHistory = (IFileHistory) inputElement;
+ entries = fileHistory.getFileRevisions();
+
+ return entries;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ entries = null;
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof AbstractHistoryCategory){
+ return ((AbstractHistoryCategory) parentElement).getRevisions();
+ }
+
+ return null;
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element instanceof AbstractHistoryCategory){
+ return ((AbstractHistoryCategory) element).hasRevisions();
+ }
+ return false;
+ }
+ });
+
+ return viewer;
+ }
+
+ public Control getControl() {
+ return localComposite;
+ }
+
+ public void setFocus() {
+ localComposite.setFocus();
+ }
+
+ public String getDescription() {
+ if (file != null)
+ return file.getFullPath().toString();
+
+ return null;
+ }
+
+ public String getName() {
+ if (file != null)
+ return file.getName();
+
+ return ""; //$NON-NLS-1$
+ }
+
+ public boolean isValidInput(Object object) {
+ //true if object is an unshared file
+ if (object instanceof IFile) {
+ if (!RepositoryProvider.isShared(((IFile) object).getProject()))
+ return true;
+ }
+
+ return false;
+ }
+
+ public void refresh() {
+ refreshHistory(true);
+ }
+
+ public Object getAdapter(Class adapter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dispose() {
+ shutdown = true;
+
+ if (resourceListener != null){
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener);
+ resourceListener = null;
+ }
+
+ //Cancel any incoming
+ if (refreshFileHistoryJob != null) {
+ if (refreshFileHistoryJob.getState() != Job.NONE) {
+ refreshFileHistoryJob.cancel();
+ }
+ }
+
+
+ }
+
+ public IFileRevision getCurrentFileRevision() {
+ if (currentFileRevision != null)
+ return currentFileRevision;
+
+ if (file != null)
+ currentFileRevision = new LocalFileRevision(file);
+
+ return currentFileRevision;
+ }
+
+ private class RefreshFileHistory extends Job {
+ private final static int NUMBER_OF_CATEGORIES = 4;
+
+ private LocalFileHistory fileHistory;
+ private AbstractHistoryCategory[] categories;
+ private boolean grouping;
+ private Object[] elementsToExpand;
+
+ public RefreshFileHistory() {
+ super(TeamUIMessages.LocalHistoryPage_FetchLocalHistoryMessage);
+ }
+
+ public void setFileHistory(LocalFileHistory fileHistory) {
+ this.fileHistory = fileHistory;
+ }
+
+ public void setGrouping (boolean value){
+ this.grouping = value;
+ }
+
+ public IStatus run(IProgressMonitor monitor) {
+
+ IStatus status = Status.OK_STATUS;
+
+ if (fileHistory != null && !shutdown) {
+ //If fileHistory termintates in a bad way, try to fetch the local
+ //revisions only
+ try {
+ fileHistory.refresh(monitor);
+ } catch (CoreException ex) {
+ status = new TeamStatus(ex.getStatus().getSeverity(), TeamUIPlugin.ID, ex.getStatus().getCode(), ex.getMessage(), ex, file);
+ }
+
+ if (grouping)
+ sortRevisions();
+
+ Utils.asyncExec(new Runnable() {
+ public void run() {
+ historyTableProvider.setFile(file);
+ if (grouping) {
+ mapExpandedElements(treeViewer.getExpandedElements());
+ treeViewer.getTree().setRedraw(false);
+ treeViewer.setInput(categories);
+ //if user is switching modes and already has expanded elements
+ //selected try to expand those, else expand all
+ if (elementsToExpand.length > 0)
+ treeViewer.setExpandedElements(elementsToExpand);
+ else {
+ treeViewer.expandAll();
+ Object[] el = treeViewer.getExpandedElements();
+ if (el != null && el.length > 0) {
+ treeViewer.setSelection(new StructuredSelection(el[0]));
+ treeViewer.getTree().deselectAll();
+ }
+ }
+ treeViewer.getTree().setRedraw(true);
+ } else {
+ if (fileHistory.getFileRevisions().length > 0) {
+ treeViewer.setInput(fileHistory);
+ } else {
+ categories = new AbstractHistoryCategory[] {getErrorMessage()};
+ treeViewer.setInput(categories);
+ }
+ }
+ }
+ }, treeViewer);
+ }
+
+ if (status != Status.OK_STATUS ) {
+ this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+ this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
+ }
+
+ return status;
+ }
+
+ private void mapExpandedElements(Object[] expandedElements) {
+ //store the names of the currently expanded categories in a map
+ HashMap elementMap = new HashMap();
+ for (int i=0; i<expandedElements.length; i++){
+ elementMap.put(((DateHistoryCategory)expandedElements[i]).getName(), null);
+ }
+
+ //Go through the new categories and keep track of the previously expanded ones
+ ArrayList expandable = new ArrayList();
+ for (int i = 0; i<categories.length; i++){
+ //check to see if this category is currently expanded
+ if (elementMap.containsKey(categories[i].getName())){
+ expandable.add(categories[i]);
+ }
+ }
+
+ elementsToExpand = new Object[expandable.size()];
+ elementsToExpand = (Object[]) expandable.toArray(new Object[expandable.size()]);
+ }
+
+ private boolean sortRevisions() {
+ IFileRevision[] fileRevision = fileHistory.getFileRevisions();
+
+ //Create the 4 categories
+ DateHistoryCategory[] tempCategories = new DateHistoryCategory[NUMBER_OF_CATEGORIES];
+ //Get a calendar instance initialized to the current time
+ Calendar currentCal = Calendar.getInstance();
+ tempCategories[0] = new DateHistoryCategory(TeamUIMessages.HistoryPage_Today, currentCal, null);
+ //Get yesterday
+ Calendar yesterdayCal = Calendar.getInstance();
+ yesterdayCal.roll(Calendar.DAY_OF_YEAR, -1);
+ tempCategories[1] = new DateHistoryCategory(TeamUIMessages.HistoryPage_Yesterday, yesterdayCal, null);
+ //Get this month
+ Calendar monthCal = Calendar.getInstance();
+ monthCal.set(Calendar.DAY_OF_MONTH, 1);
+ tempCategories[2] = new DateHistoryCategory(TeamUIMessages.HistoryPage_ThisMonth, monthCal, yesterdayCal);
+ //Everything before after week is previous
+ tempCategories[3] = new DateHistoryCategory(TeamUIMessages.HistoryPage_Previous, null, monthCal);
+
+ ArrayList finalCategories = new ArrayList();
+ for (int i = 0; i<NUMBER_OF_CATEGORIES; i++){
+ tempCategories[i].collectFileRevisions(fileRevision, false);
+ if (tempCategories[i].hasRevisions())
+ finalCategories.add(tempCategories[i]);
+ }
+
+ //Assume that some revisions have been found
+ boolean revisionsFound = true;
+
+ if (finalCategories.size() == 0){
+ //no revisions found for the current mode, so add a message category
+ finalCategories.add(getErrorMessage());
+ revisionsFound = false;
+ }
+
+ categories = (AbstractHistoryCategory[])finalCategories.toArray(new AbstractHistoryCategory[finalCategories.size()]);
+ return revisionsFound;
+ }
+
+ private MessageHistoryCategory getErrorMessage(){
+ MessageHistoryCategory messageCategory = new MessageHistoryCategory(TeamUIMessages.LocalHistoryPage_NoRevisionsFound);
+ return messageCategory;
+ }
+ }
+
+ private class HistoryResourceListener implements IResourceChangeListener {
+ /**
+ * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta root = event.getDelta();
+
+ if (file == null)
+ return;
+
+ IResourceDelta resourceDelta = root.findMember(file.getFullPath());
+ if (resourceDelta != null){
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ refresh();
+ }
+ });
+ }
+ }
+ }
+
+ private Action getContextMenuAction(String title, final boolean needsProgressDialog, final IWorkspaceRunnable action) {
+ return new Action(title) {
+ public void run() {
+ try {
+ if (file == null) return;
+ ISelection selection = treeViewer.getSelection();
+ if (!(selection instanceof IStructuredSelection)) return;
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ Object o = ss.getFirstElement();
+
+ if (o instanceof AbstractHistoryCategory)
+ return;
+
+ currentSelection = (IFileRevision)o;
+ if(needsProgressDialog) {
+ PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ action.run(monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ });
+ } else {
+ try {
+ action.run(null);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ } catch (InvocationTargetException e) {
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ Utils.handleError(parentSite.getShell(), e, null, null);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+
+ public boolean isEnabled() {
+ ISelection selection = treeViewer.getSelection();
+ if (!(selection instanceof IStructuredSelection)) return false;
+ IStructuredSelection ss = (IStructuredSelection)selection;
+ if(ss.size() != 1) return false;
+ return true;
+ }
+ };
+ }
+
+ private boolean confirmOverwrite() {
+ if (file != null && file.exists()) {
+ String title = TeamUIMessages.LocalHistoryPage_OverwriteTitle;
+ String msg = TeamUIMessages.LocalHistoryPage_OverwriteMessage;
+ IHistoryPageSite parentSite = getHistoryPageSite();
+ final MessageDialog dialog = new MessageDialog(parentSite.getShell(), title, null, msg, MessageDialog.QUESTION, new String[] {IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
+ final int[] result = new int[1];
+ parentSite.getShell().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ result[0] = dialog.open();
+ }
+ });
+ if (result[0] != 0) {
+ // cancel
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
new file mode 100644
index 000000000..261f07a2b
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.ui.history;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.part.Page;
+
+/**
+ * Abstract HistoryPage class that keeps track of the history page site.
+ * <p>
+ * Clients may subclass this class.
+ * @see IHistoryPage
+ * @since 3.2
+ */
+public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptable {
+
+ private IHistoryPageSite site;
+ private Object input;
+ private IHistoryView historyView;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.history.IHistoryPage#setSite(org.eclipse.team.ui.history.IHistoryPageSite)
+ */
+ public void setSite(IHistoryPageSite site) {
+ this.site = site;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.history.IHistoryPage#getHistoryPageSite()
+ */
+ public IHistoryPageSite getHistoryPageSite() {
+ return site;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.history.IHistoryPage#getInput()
+ */
+ public Object getInput() {
+ return input;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.history.IHistoryPage#setInput(java.lang.Object, boolean)
+ */
+ public boolean setInput(Object object) {
+ this.input = object;
+ return inputSet();
+ }
+
+ /**
+ * Called by HistoryPage after {@link #setInput(Object)}. Clients can
+ * gain access to the input by using {@link #getInput()}.
+ *
+ * @return <code>true</code> if the page was able to display the contents, <code>false</code> otherwise
+ */
+ public abstract boolean inputSet();
+
+
+ public void setHistoryView(IHistoryView historyView){
+ this.historyView=historyView;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.history.IHistoryPage#getHistoryView()
+ */
+ public IHistoryView getHistoryView() {
+ if (historyView != null)
+ return historyView;
+
+ return null;
+ }
+
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
new file mode 100644
index 000000000..ed0ba98b5
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.team.ui.history;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.team.core.history.IFileHistoryProvider;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.ui.SubActionBars;
+
+
+/**
+ * <p>Interface for pages that appear in the team history view.</p>
+ * <p><em>This interface is not intended to be implemented by clients.
+ * Clients can instead subclass {@link HistoryPage}.</em></p>
+ *
+ * <h3>Lifecycle</h3>
+ * <p>
+ * Once an Object requests to have its history shown in the History View (through an action or DND), the History View
+ * will first try to see if any of the open History Views (there can be multiple Views if some of them are pinned) currently
+ * show the requested Object's history. It does this by calling {@link HistoryPage#getInput()} on each IHistoryPage (which is supposed
+ * to extend {@link HistoryPage} and comparing the input with the passed in Object. If a History View is found that already contains the Object,
+ * it is brought to the front and its history is refreshed (by calling {@link #refresh()}).
+ * If no History View already contains the requested Object an <code>IHistoryPage</code> might need to be created if the current <code>IHistoryPage</code>
+ * being shown in the History View doesn't know how to display the Object or if there are no <code>IHistoryPage</code>s being shown in the History View.
+ * </p>
+ * <p>
+ * The History View uses an {@link IHistoryPageSource#createPage(Object)} to create the <code>IHistoryPage</code>. If the History View can
+ * determine what the Repository Provider is for the dropped Object (i.e. the Object is an instance of {@link IResource}), then it will try
+ * to get the {@link IFileHistoryProvider} for the Repository Provider by calling {@link RepositoryProvider#getFileHistoryProvider()}. If no
+ * <code>IFileHistoryProvider</code> is returned, the History View will try to adapt the Repository Provider to a <code>IFileHistoryProvider</code>.
+ * If the Object whose history is being requested is not an {@link IResource}, it will not be possible to retrieve the Repository Provider from it.
+ * In these instances the History View will try to adapt the Object to an {@link IHistoryPageSource}.
+ * </p>
+ * <p>
+ * Once the <code>IHistoryPage</code> is created, {@link IHistoryPage#setInput(Object)} is called; this is handled by {@link HistoryPage} which clients
+ * should subclass for their own <code>IHistoryPage</code> implementations. <code>HistoryPage</code> will in turn call {@link HistoryPage#inputSet()} -
+ * which clients can use for setting up their <code>IHistoryPage</code>. The old page in the History View (along with its {@link SubActionBars} is disposed -
+ * {@link HistoryPage#dispose()} gets called; interested clients can supply a <code>dispose()</code> method in their subclass. Finally, the new page is shown
+ * and its SubActionBars are activated.
+ * </p>
+ *
+ *
+ * @see TeamUI#getHistoryView()
+ * @since 3.2
+ */
+public interface IHistoryPage {
+
+ /**
+ * Fetches and populates the history page for the given Object. Clients
+ * should provide an implementation for their individual pages.
+ *
+ * @param object the object for which history is being requested for
+ * @return true if the page was able to display the history for the object, false otherwise
+ * @since 3.2
+ */
+ public boolean setInput(Object object);
+
+ /**
+ * Returns the object whose history is currently being displayed in the history page.
+ * @return object the object being displayed in the history page or <code>null</code>
+ * if no input has been set;
+ * @since 3.2
+ */
+ public Object getInput();
+
+ /**
+ * Returns true if this history page can show a history for the given object, false if it cannot
+ * @param object the object that is to have history shown
+ * @return boolean
+ * @since 3.2
+ */
+ public boolean isValidInput(Object object);
+
+ /**
+ * Requests a refresh of the information presented by the history page.
+ * @since 3.2
+ */
+ public void refresh();
+
+ /**
+ * Returns the name of the object whose history the page is showing
+ * @return String containing the name of the object
+ * @since 3.2
+ */
+ public String getName();
+
+ /**
+ * Returns a one line description of the object whose history is
+ * being displayed. For example, for files, this may be the
+ * workspace path of the file. The description may be displayed to
+ * the user as tooltip text or by some other means.
+ * @return a one line description of the object whose history is
+ * being displayed or <code>null</code>
+ * @since 3.2
+ */
+ public String getDescription();
+
+ /**
+ * Set the site for the page - this needs to be replaced with a proper
+ * {@link IHistoryPageSite} in order to allow history pages to be displayed in
+ * both views and dialogs.
+ * @param site the history page site
+ * @since 3.2
+ */
+ public void setSite(IHistoryPageSite site);
+
+ /**
+ * Returns the {@link IHistoryPageSite} set for this page.
+ * @return the history page site for this page
+ * @since 3.2
+ */
+ public IHistoryPageSite getHistoryPageSite();
+
+ /**
+ * Called to allow IHistoryPage a chance to dispose of any widgets created
+ * for its page implementation
+ * @since 3.2
+ */
+ public void dispose();
+
+ /**
+ * Returns the {@link IHistoryView} instance that contains this history page or <em>null</em> if
+ * the history view instance cannot be determined.
+ * @return IHistoryView the history view that contains this history page or <em>null</em> if
+ * the history view instance cannot be determined.
+ * @since 3.3
+ */
+ public IHistoryView getHistoryView();
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
new file mode 100644
index 000000000..5b7a8c11c
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
@@ -0,0 +1,670 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.ui.synchronize;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.core.mapping.*;
+import org.eclipse.team.core.mapping.provider.*;
+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.mapping.ModelEnablementPreferencePage;
+import org.eclipse.team.internal.ui.mapping.ModelSynchronizePage;
+import org.eclipse.team.internal.ui.preferences.SyncViewerPreferencePage;
+import org.eclipse.team.internal.ui.synchronize.*;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.mapping.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+/**
+ * Synchronize participant that obtains it's synchronization state from
+ * a {@link ISynchronizationContext}.
+ * <p>
+ * This class may be subclassed by clients.
+ *
+ * @since 3.2
+ */
+public class ModelSynchronizeParticipant extends
+ AbstractSynchronizeParticipant {
+
+ /**
+ * Property constant used to store and retrieve the id of the active
+ * {@link ModelProvider} from an {@link ISynchronizePageConfiguration}. The
+ * active model provider will be the only one visible in the page. If
+ * <code>null</code> or <code>ALL_MODEL_PROVIDERS_ACTIVE</code> is
+ * returned, all model providers are considered active and are visible.
+ */
+ public static final String P_VISIBLE_MODEL_PROVIDER = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$
+
+ /**
+ * Constant used with the <code>P_ACTIVE_MODEL_PROVIDER</code> property to indicate
+ * that all enabled model providers are active.
+ */
+ public static final String ALL_MODEL_PROVIDERS_VISIBLE = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$
+
+ /**
+ * Property constant used during property change notification to indicate
+ * that the enabled model providers for this participant have changed.
+ */
+ public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$
+
+ /**
+ * Property constant used during property change notification to indicate
+ * that the active model of this participant has changed.
+ */
+ public static final String PROP_ACTIVE_SAVEABLE = TeamUIPlugin.ID + ".ACTIVE_SAVEABLE"; //$NON-NLS-1$
+
+ /**
+ * Property constant used during property change notification to indicate
+ * that the dirty state for the active saveable model of this participant has changed.
+ */
+ public static final String PROP_DIRTY = TeamUIPlugin.ID + ".DIRTY"; //$NON-NLS-1$
+
+ /*
+ * Key for settings in memento
+ */
+ private static final String CTX_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_SETTINGS"; //$NON-NLS-1$
+
+ /*
+ * Key for schedule in memento
+ */
+ private static final String CTX_REFRESH_SCHEDULE_SETTINGS = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_REFRESH_SCHEDULE"; //$NON-NLS-1$
+
+ /*
+ * Key for description in memento
+ */
+ private static final String CTX_DESCRIPTION = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_DESCRIPTION"; //$NON-NLS-1$
+
+ /*
+ * Constants used to save and restore this scope
+ */
+ private static final String CTX_PARTICIPANT_MAPPINGS = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_MAPPINGS"; //$NON-NLS-1$
+ private static final String CTX_MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
+ private static final String CTX_MODEL_PROVIDER_MAPPINGS = "mappings"; //$NON-NLS-1$
+ private static final String CTX_STARTUP_ACTION = "startupAction"; //$NON-NLS-1$
+
+ private SynchronizationContext context;
+ private boolean mergingEnabled = true;
+ protected SubscriberRefreshSchedule refreshSchedule;
+ private String description;
+ private SaveableComparison activeSaveable;
+ private PreferenceStore preferences = new PreferenceStore() {
+ public void save() throws IOException {
+ // Nothing to do. Preference will be saved with participant
+ }
+ };
+
+ private IPropertyListener dirtyListener = new IPropertyListener() {
+ public void propertyChanged(Object source, int propId) {
+ if (source instanceof SaveableComparison && propId == SaveableComparison.PROP_DIRTY) {
+ SaveableComparison scm = (SaveableComparison) source;
+ boolean isDirty = scm.isDirty();
+ firePropertyChange(ModelSynchronizeParticipant.this, PROP_DIRTY, Boolean.valueOf(!isDirty), Boolean.valueOf(isDirty));
+ }
+ }
+ };
+
+ /**
+ * Create a participant for the given context
+ * @param context the synchronization context
+ * @param name the name of the participant
+ * @return a participant for the given context
+ */
+ public static ModelSynchronizeParticipant createParticipant(SynchronizationContext context, String name) {
+ return new ModelSynchronizeParticipant(context, name);
+ }
+
+ /*
+ * Create a participant for the given context
+ * @param context the synchronization context
+ * @param name the name of the participant
+ */
+ private ModelSynchronizeParticipant(SynchronizationContext context, String name) {
+ initializeContext(context);
+ try {
+ setInitializationData(TeamUI.getSynchronizeManager().getParticipantDescriptor("org.eclipse.team.ui.synchronization_context_synchronize_participant")); //$NON-NLS-1$
+ } catch (CoreException e) {
+ TeamUIPlugin.log(e);
+ }
+ setSecondaryId(Long.toString(System.currentTimeMillis()));
+ setName(name);
+ refreshSchedule = new SubscriberRefreshSchedule(createRefreshable());
+ }
+
+ /**
+ * Create a participant for the given context
+ * @param context the synchronization context
+ */
+ public ModelSynchronizeParticipant(SynchronizationContext context) {
+ initializeContext(context);
+ refreshSchedule = new SubscriberRefreshSchedule(createRefreshable());
+ }
+
+ /**
+ * Create a participant in order to restore it from saved state.
+ */
+ public ModelSynchronizeParticipant() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getName()
+ */
+ public String getName() {
+ String name = super.getName();
+ if (description == null)
+ description = Utils.getScopeDescription(getContext().getScope());
+ return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, description });
+ }
+
+ /**
+ * Return the name of the participant as specified in the plugin manifest file.
+ * This method is provided to give access to this name since it is masked by
+ * the <code>getName()</code> method defined in this class.
+ * @return the name of the participant as specified in the plugin manifest file
+ * @since 3.1
+ */
+ protected final String getShortName() {
+ return super.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
+ */
+ protected void initializeConfiguration(
+ ISynchronizePageConfiguration configuration) {
+ if (isMergingEnabled()) {
+ // The context menu groups are defined by the org.eclipse.ui.navigator.viewer extension
+ configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, ModelSynchronizeParticipantActionGroup.MERGE_ACTION_GROUP);
+ configuration.addActionContribution(createMergeActionGroup());
+ }
+ configuration.setSupportedModes(ISynchronizePageConfiguration.ALL_MODES);
+ configuration.setMode(ISynchronizePageConfiguration.BOTH_MODE);
+ configuration.setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT, getContext());
+ configuration.setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, getContext().getScope());
+ if (getHandler() != null)
+ configuration.setProperty(StartupPreferencePage.STARTUP_PREFERENCES, preferences);
+ }
+
+ /**
+ * Create the merge action group for this participant.
+ * Subclasses can override in order to provide a
+ * merge action group that configures certain aspects
+ * of the merge actions.
+ * @return the merge action group for this participant
+ */
+ protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
+ return new ModelSynchronizeParticipantActionGroup();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createPage(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
+ */
+ public final IPageBookViewPage createPage(
+ ISynchronizePageConfiguration configuration) {
+ return new ModelSynchronizePage(configuration);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)
+ */
+ public void run(IWorkbenchPart part) {
+ refresh(part != null ? part.getSite() : null, context.getScope().getMappings());
+ }
+
+ /**
+ * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing
+ * can also be considered synchronizing, or refreshing the synchronization state. Basically this is a long
+ * running operation that will update the participant's context with new changes detected on the
+ * server.
+ *
+ * @param site the workbench site the synchronize is running from. This can be used to notify the site
+ * that a job is running.
+ * @param mappings the resource mappings to be refreshed
+ */
+ public final void refresh(IWorkbenchSite site, ResourceMapping[] mappings) {
+ IRefreshSubscriberListener listener = new RefreshUserNotificationPolicy(this);
+ internalRefresh(mappings, null, null, site, listener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#dispose()
+ */
+ public void dispose() {
+ context.dispose();
+ Platform.getJobManager().cancel(this);
+ refreshSchedule.dispose();
+ }
+
+ /**
+ * Set the context of this participant. This method must be invoked
+ * before a page is obtained from the participant.
+ * @param context the context for this participant
+ */
+ protected void initializeContext(SynchronizationContext context) {
+ this.context = context;
+ mergingEnabled = context instanceof IMergeContext;
+ SubscriberDiffTreeEventHandler handler = getHandler();
+ if (handler != null) {
+ preferences.setDefault(StartupPreferencePage.PROP_STARTUP_ACTION, StartupPreferencePage.STARTUP_ACTION_NONE);
+ if (isSynchronizeOnStartup()) {
+ run(null); // TODO: Would like to get the Sync view part if possible
+ } else if (isPopulateOnStartup()) {
+ handler.initializeIfNeeded();
+ }
+ }
+ }
+
+ private boolean isPopulateOnStartup() {
+ String pref = preferences.getString(StartupPreferencePage.PROP_STARTUP_ACTION);
+ return pref != null && pref.equals(StartupPreferencePage.STARTUP_ACTION_POPULATE);
+ }
+
+ private boolean isSynchronizeOnStartup() {
+ String pref = preferences.getString(StartupPreferencePage.PROP_STARTUP_ACTION);
+ return pref != null && pref.equals(StartupPreferencePage.STARTUP_ACTION_SYNCHRONIZE);
+ }
+
+ /**
+ * Return the synchronization context for this participant.
+ * @return the synchronization context for this participant
+ */
+ public ISynchronizationContext getContext() {
+ return context;
+ }
+
+ /**
+ * Return a compare input for the given model object or <code>null</code>
+ * if the object is not eligible for comparison.
+ * @param object the model object
+ * @return a compare input for the model object or <code>null</code>
+ */
+ public ICompareInput asCompareInput(Object object) {
+ if (object instanceof ICompareInput) {
+ return (ICompareInput) object;
+ }
+ // Get a compare input from the model provider's compare adapter
+ ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(object);
+ if (adapter != null)
+ return adapter.asCompareInput(getContext(), object);
+ return null;
+ }
+
+ /**
+ * Return whether their is a compare input associated with the given object.
+ * In other words, return <code>true</code> if {@link #asCompareInput(Object) }
+ * would return a value and <code>false</code> if it would return <code>null</code>.
+ * @param object the object.
+ * @return whether their is a compare input associated with the given object
+ */
+ public boolean hasCompareInputFor(Object object) {
+ // Get a content viewer from the model provider's compare adapter
+ ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(object);
+ if (adapter != null)
+ return adapter.hasCompareInput(getContext(), object);
+ return false;
+ }
+
+ /**
+ * Return whether merge capabilities are enabled for this participant.
+ * If merging is enabled, merge actions can be shown. If merging is disabled, no
+ * merge actions should be surfaced.
+ * @return whether merge capabilities should be enabled for this participant
+ */
+ public boolean isMergingEnabled() {
+ return mergingEnabled;
+ }
+
+ /**
+ * Set whether merge capabilities should be enabled for this participant.
+ * @param mergingEnabled whether merge capabilities should be enabled for this participant
+ */
+ public void setMergingEnabled(boolean mergingEnabled) {
+ this.mergingEnabled = mergingEnabled;
+ }
+
+ private void internalRefresh(ResourceMapping[] mappings, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) {
+ if (jobName == null)
+ jobName = getShortTaskName();
+ if (taskName == null)
+ taskName = getLongTaskName(mappings);
+ Platform.getJobManager().cancel(this);
+ RefreshParticipantJob job = new RefreshModelParticipantJob(this, jobName, taskName, mappings, listener);
+ job.setUser(true);
+ Utils.schedule(job, site);
+
+ // Remember the last participant synchronized
+ TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId());
+ TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId());
+ }
+
+ /**
+ * Returns the short task name (e.g. no more than 25 characters) to describe
+ * the behavior of the refresh operation to the user. This is typically
+ * shown in the status line when this participant is refreshed in the
+ * background. When refreshed in the foreground, only the long task name is
+ * shown.
+ *
+ * @return the short task name to show in the status line.
+ */
+ protected String getShortTaskName() {
+ return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, getShortName());
+ }
+
+ /**
+ * Returns the long task name to describe the behavior of the refresh
+ * operation to the user. This is typically shown in the status line when
+ * this subscriber is refreshed in the background.
+ *
+ * @param mappings the mappings being refreshed
+ * @return the long task name
+ * @since 3.1
+ */
+ protected String getLongTaskName(ResourceMapping[] mappings) {
+ if (mappings == null) {
+ // If the mappings are null, assume we are refreshing everything
+ mappings = getContext().getScope().getMappings();
+ }
+ int mappingCount = mappings.length;
+ if (mappingCount == getContext().getScope().getMappings().length) {
+ // Assume we are refreshing everything and only use the input mapping count
+ mappings = getContext().getScope().getInputMappings();
+ mappingCount = mappings.length;
+ }
+ if (mappingCount == 1) {
+ return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), Utils.getLabel(mappings[0]) });
+ }
+ return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(mappingCount) });
+ }
+
+ private IRefreshable createRefreshable() {
+ return new IRefreshable() {
+
+ public RefreshParticipantJob createJob(String interval) {
+ String jobName = NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { ModelSynchronizeParticipant.this.getName(), interval });
+ return new RefreshModelParticipantJob(ModelSynchronizeParticipant.this,
+ jobName,
+ jobName,
+ context.getScope().getMappings(),
+ new RefreshUserNotificationPolicy(ModelSynchronizeParticipant.this));
+ }
+ public ISynchronizeParticipant getParticipant() {
+ return ModelSynchronizeParticipant.this;
+ }
+ public void setRefreshSchedule(SubscriberRefreshSchedule schedule) {
+ ModelSynchronizeParticipant.this.setRefreshSchedule(schedule);
+ }
+ public SubscriberRefreshSchedule getRefreshSchedule() {
+ return refreshSchedule;
+ }
+
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter(Class adapter) {
+ if (adapter == IRefreshable.class && refreshSchedule != null) {
+ return refreshSchedule.getRefreshable();
+
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#saveState(org.eclipse.ui.IMemento)
+ */
+ public void saveState(IMemento memento) {
+ super.saveState(memento);
+ IMemento settings = memento.createChild(CTX_PARTICIPANT_SETTINGS);
+ if (description != null)
+ settings.putString(CTX_DESCRIPTION, description);
+ refreshSchedule.saveState(settings.createChild(CTX_REFRESH_SCHEDULE_SETTINGS));
+ saveMappings(settings);
+ settings.putString(CTX_STARTUP_ACTION, preferences.getString(StartupPreferencePage.PROP_STARTUP_ACTION));
+ }
+
+ private void saveMappings(IMemento settings) {
+ ISynchronizationScope inputScope = getContext().getScope().asInputScope();
+ ModelProvider[] providers = inputScope.getModelProviders();
+ for (int i = 0; i < providers.length; i++) {
+ ModelProvider provider = providers[i];
+ ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(provider);
+ if (adapter != null) {
+ IMemento child = settings.createChild(CTX_PARTICIPANT_MAPPINGS);
+ String id = provider.getDescriptor().getId();
+ child.putString(CTX_MODEL_PROVIDER_ID, id);
+ adapter.save(inputScope.getMappings(id), child.createChild(CTX_MODEL_PROVIDER_MAPPINGS));
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento)
+ */
+ public void init(String secondaryId, IMemento memento) throws PartInitException {
+ super.init(secondaryId, memento);
+ if(memento != null) {
+ IMemento settings = memento.getChild(CTX_PARTICIPANT_SETTINGS);
+ String startupAction = settings.getString(StartupPreferencePage.PROP_STARTUP_ACTION);
+ if (startupAction != null)
+ preferences.putValue(StartupPreferencePage.PROP_STARTUP_ACTION, startupAction);
+ ResourceMapping[] mappings = loadMappings(settings);
+ if (mappings.length == 0)
+ throw new PartInitException(NLS.bind(TeamUIMessages.ModelSynchronizeParticipant_0, getId()));
+ initializeContext(mappings);
+ if(settings != null) {
+ SubscriberRefreshSchedule schedule = SubscriberRefreshSchedule.init(settings.getChild(CTX_REFRESH_SCHEDULE_SETTINGS), createRefreshable());
+ description = settings.getString(CTX_DESCRIPTION);
+ setRefreshSchedule(schedule);
+ if(schedule.isEnabled()) {
+ schedule.startJob();
+ }
+ }
+ }
+ }
+
+ private ResourceMapping[] loadMappings(IMemento settings) throws PartInitException {
+ List result = new ArrayList();
+ IMemento[] children = settings.getChildren(CTX_PARTICIPANT_MAPPINGS);
+ for (int i = 0; i < children.length; i++) {
+ IMemento memento = children[i];
+ String id = memento.getString(CTX_MODEL_PROVIDER_ID);
+ if (id != null) {
+ IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(id);
+ try {
+ ModelProvider provider = desc.getModelProvider();
+ ISynchronizationCompareAdapter adapter = Utils.getCompareAdapter(provider);
+ if (adapter != null) {
+ ResourceMapping[] mappings = adapter.restore(memento.getChild(CTX_MODEL_PROVIDER_MAPPINGS));
+ for (int j = 0; j < mappings.length; j++) {
+ ResourceMapping mapping = mappings[j];
+ result.add(mapping);
+ }
+ }
+ } catch (CoreException e) {
+ TeamUIPlugin.log(e);
+ }
+ }
+ }
+ return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
+ }
+
+ private void initializeContext(ResourceMapping[] mappings) throws PartInitException {
+ try {
+ ISynchronizationScopeManager manager = createScopeManager(mappings);
+ MergeContext context = restoreContext(manager);
+ initializeContext(context);
+ } catch (CoreException e) {
+ TeamUIPlugin.log(e);
+ throw new PartInitException(e.getStatus());
+ }
+ }
+
+ /**
+ * Recreate the context for this participant. This method is invoked when
+ * the participant is restored after a restart. Although it is provided
+ * with a progress monitor, long running operations should be avoided.
+ * @param manager the restored scope
+ * @return the context for this participant
+ * @throws CoreException
+ */
+ protected MergeContext restoreContext(ISynchronizationScopeManager manager) throws CoreException {
+ throw new PartInitException(NLS.bind(TeamUIMessages.ModelSynchronizeParticipant_1, getId()));
+ }
+
+ /**
+ * Create and return a scope manager that can be used to build the scope of this
+ * participant when it is restored after a restart. By default, this method
+ * returns a scope manager that uses the local content.
+ * This method can be overridden by subclasses.
+ *
+ * @param mappings the restored mappings
+ * @return a scope manager that can be used to build the scope of this
+ * participant when it is restored after a restart
+ */
+ protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
+ return new SynchronizationScopeManager(super.getName(), mappings, ResourceMappingContext.LOCAL_CONTEXT, true);
+ }
+
+ /* private */ void setRefreshSchedule(SubscriberRefreshSchedule schedule) {
+ if (refreshSchedule != schedule) {
+ if (refreshSchedule != null) {
+ refreshSchedule.dispose();
+ }
+ this.refreshSchedule = schedule;
+ }
+ // Always fir the event since the schedule may have been changed
+ firePropertyChange(this, AbstractSynchronizeParticipant.P_SCHEDULED, schedule, schedule);
+ }
+
+ /**
+ * Return the active saveable for this participant.
+ * There is at most one saveable active at any
+ * time.
+ * @return the active saveable for this participant
+ * or <code>null</code>
+ */
+ public SaveableComparison getActiveSaveable() {
+ return activeSaveable;
+ }
+
+ /**
+ * Set the active saveable of this participant.
+ * @param activeSaveable the active saveable (may be <code>null</code>)
+ */
+ public void setActiveSaveable(SaveableComparison activeSaveable) {
+ boolean wasDirty = false;
+ SaveableComparison oldModel = this.activeSaveable;
+ if (oldModel != null) {
+ oldModel.removePropertyListener(dirtyListener);
+ wasDirty = oldModel.isDirty();
+ }
+ this.activeSaveable = activeSaveable;
+ firePropertyChange(this, PROP_ACTIVE_SAVEABLE, oldModel, activeSaveable);
+ boolean isDirty = false;
+ if (activeSaveable != null) {
+ activeSaveable.addPropertyListener(dirtyListener);
+ isDirty = activeSaveable.isDirty();
+ }
+ if (isDirty != wasDirty)
+ firePropertyChange(this, PROP_DIRTY, Boolean.valueOf(wasDirty), Boolean.valueOf(isDirty));
+ }
+
+ /**
+ * Convenience method for switching the active saveable of this participant
+ * to the saveable of the given input.
+ * @param shell a shell
+ * @param input the compare input about to be displayed
+ * @param cancelAllowed whether the display of the compare input can be canceled
+ * @param monitor a progress monitor or <code>null</code> if progress reporting is not required
+ * @return whether the user choose to continue with the display of the given compare input
+ * @throws CoreException
+ */
+ public boolean checkForBufferChange(Shell shell, ISynchronizationCompareInput input, boolean cancelAllowed, IProgressMonitor monitor) throws CoreException {
+ SaveableComparison currentBuffer = getActiveSaveable();
+ SaveableComparison targetBuffer = input.getSaveable();
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
+ try {
+ ModelParticipantAction.handleTargetSaveableChange(shell, targetBuffer, currentBuffer, cancelAllowed, Policy.subMonitorFor(monitor, 10));
+ } catch (InterruptedException e) {
+ return false;
+ }
+ setActiveSaveable(targetBuffer);
+ return true;
+ }
+
+ /**
+ * Return the list of model providers that are enabled for the participant.
+ * By default, the list is those model providers that contain mappings
+ * in the scope. Subclasses may override to add additional model providers.
+ * @return the list of model providers that are active for the participant
+ */
+ public ModelProvider[] getEnabledModelProviders() {
+ return getContext().getScope().getModelProviders();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages()
+ */
+ public PreferencePage[] getPreferencePages() {
+ List pages = new ArrayList();
+ SyncViewerPreferencePage syncViewerPreferencePage = new SyncViewerPreferencePage();
+ syncViewerPreferencePage.setIncludeDefaultLayout(false);
+ pages.add(syncViewerPreferencePage);
+ pages.add(new ModelEnablementPreferencePage());
+ ITeamContentProviderDescriptor[] descriptors = TeamUI.getTeamContentProviderManager().getDescriptors();
+ for (int i = 0; i < descriptors.length; i++) {
+ ITeamContentProviderDescriptor descriptor = descriptors[i];
+ if (isIncluded(descriptor)) {
+ try {
+ PreferencePage page = (PreferencePage)descriptor.createPreferencePage();
+ if (page != null) {
+ pages.add(page);
+ }
+ } catch (CoreException e) {
+ TeamUIPlugin.log(e);
+ }
+ }
+ }
+ if (getHandler() != null) {
+ pages.add(new StartupPreferencePage(preferences));
+ }
+ return (PreferencePage[]) pages.toArray(new PreferencePage[pages.size()]);
+ }
+
+ private boolean isIncluded(ITeamContentProviderDescriptor descriptor) {
+ ModelProvider[] providers = getEnabledModelProviders();
+ for (int i = 0; i < providers.length; i++) {
+ ModelProvider provider = providers[i];
+ if (provider.getId().equals(descriptor.getModelProviderId())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private SubscriberDiffTreeEventHandler getHandler() {
+ return (SubscriberDiffTreeEventHandler)Utils.getAdapter(context, SubscriberDiffTreeEventHandler.class);
+ }
+
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
new file mode 100644
index 000000000..b6f7eb10a
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.ui.synchronize;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.wizard.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.team.internal.ui.ITeamUIImages;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.ui.TeamImages;
+
+/**
+ * This is a convenience class for creating wizards for use with the
+ * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point.
+ *
+ * @since 3.2
+ */
+public abstract class ParticipantSynchronizeWizard extends Wizard {
+
+ private WizardPage selectionPage;
+ private IWizard importWizard;
+
+ /**
+ * Create the wizard.
+ */
+ protected ParticipantSynchronizeWizard() {
+ setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+ setNeedsProgressMonitor(false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#getWindowTitle()
+ */
+ public String getWindowTitle() {
+ return TeamUIMessages.GlobalRefreshSubscriberPage_0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ public void addPages() {
+ if (getRootResources().length == 0) {
+ importWizard = getImportWizard();
+ if (importWizard != null){
+ importWizard.setContainer(getContainer());
+ importWizard.addPages();
+ IWizardPage startingPage = importWizard.getStartingPage();
+ if (startingPage != null) {
+ startingPage.setTitle(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_0, new String[] { getPageTitle() }));
+ startingPage.setDescription(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_1, new String[] { importWizard.getWindowTitle() }));
+ }
+ }
+ } else {
+ selectionPage = createScopeSelectionPage();
+ selectionPage.setTitle(NLS.bind(TeamUIMessages.GlobalRefreshSubscriberPage_1, new String[] { getPageTitle() }));
+ selectionPage.setMessage(TeamUIMessages.GlobalRefreshSubscriberPage_2);
+ addPage(selectionPage);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+ public boolean performFinish() {
+ if (importWizard != null) {
+ return importWizard.performFinish();
+ } else {
+ createParticipant();
+ return true;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
+ */
+ public IWizardPage getNextPage(IWizardPage page) {
+ if(importWizard != null ) {
+ return importWizard.getNextPage(page);
+ }
+ return super.getNextPage(page);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performCancel()
+ */
+ public boolean performCancel() {
+ if(importWizard != null) {
+ return importWizard.performCancel();
+ }
+ return super.performCancel();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#canFinish()
+ */
+ public boolean canFinish() {
+ if(importWizard != null) {
+ return importWizard.canFinish();
+ }
+ return super.canFinish();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#getStartingPage()
+ */
+ public IWizardPage getStartingPage() {
+ if(importWizard != null) {
+ return importWizard.getStartingPage();
+ }
+ return super.getStartingPage();
+ }
+
+ /**
+ * Return the page title for the page used by this wizard.
+ * @return the page title for the page used by this wizard
+ */
+ protected abstract String getPageTitle();
+
+ /**
+ * Return a wizard that can be used to populate the workspace
+ * if there are no resources returned from {@link #getRootResources()}.
+ * @return a wizard that can be used to populate the workspace
+ */
+ protected abstract IWizard getImportWizard();
+
+ /**
+ * Return the resources that are the roots of the resource
+ * trees that can be considered for inclusion.
+ * @return the resources that are the roots of the resource
+ * trees that can be considered for inclusion
+ */
+ protected abstract IResource[] getRootResources();
+
+ /**
+ * Create the page which allows the user to select the scope
+ * for the operation.
+ * @return the page which allows the user to select the scope
+ * for the operation
+ */
+ protected abstract WizardPage createScopeSelectionPage();
+
+ /**
+ * Method called from {@link #performFinish()} to create
+ * a participant. This participant will be added to the
+ * Synchronize view.
+ */
+ protected abstract void createParticipant();
+
+}

Back to the top